@sfdc-webapps/feature-authentication 1.0.2 → 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 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfdc-webapps/feature-authentication",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Authentication feature for web applications",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -10,10 +10,10 @@
10
10
  "access": "public"
11
11
  },
12
12
  "scripts": {
13
- "dev": "cd dist/digitalExperiences/webApplications/feature-authentication && yarn && yarn dev",
14
- "build": "npx tsx ../cli/src/index.ts apply-patches packages/feature-authentication packages/base-react-app packages/feature-authentication/dist --clean --skip-dependency-changes && yarn postbuild",
15
- "postbuild": "cd dist/digitalExperiences/webApplications/feature-authentication && yarn link @salesforce/webapps && yarn link @salesforce/vite-plugin-webapps",
16
- "watch": "npx tsx ../cli/src/index.ts watch-patches packages/feature-authentication packages/base-react-app packages/feature-authentication/dist --clean"
13
+ "build": "npx tsx ../cli/src/index.ts apply-patches packages/feature-authentication packages/base-react-app packages/feature-authentication/dist --reset --skip-dependency-changes",
14
+ "clean": "rm -rf dist",
15
+ "dev": "cd dist/digitalExperiences/webApplications/feature-authentication && npm install && npm run dev",
16
+ "watch": "npx tsx ../cli/src/index.ts watch-patches packages/feature-authentication packages/base-react-app packages/feature-authentication/dist"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/react": "^19.2.7",
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext, useState, useEffect, useCallback, type ReactNode } from 'react';
2
- import { getCurrentUser, type User } from '@salesforce/webapps/api';
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
-