@salesforce/webapp-template-feature-react-authentication-experimental 1.26.0 → 1.27.1
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/dist/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +2 -1
- package/dist/.a4drules/skills/install-feature/SKILL.md +14 -6
- package/dist/.a4drules/skills/install-feature/scripts/copy-feature-assets.sh +36 -0
- package/dist/CHANGELOG.md +19 -0
- package/dist/force-app/main/default/webapplications/feature-react-authentication/build/vite.config.js +64 -64
- package/dist/force-app/main/default/webapplications/feature-react-authentication/package-lock.json +1230 -45
- package/dist/force-app/main/default/webapplications/feature-react-authentication/package.json +13 -4
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/components/ui/button.tsx +9 -11
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/components/ui/spinner.tsx +7 -2
- package/dist/package.json +1 -1
- package/package.json +5 -4
|
@@ -123,7 +123,8 @@ mutation mutateEntityName(
|
|
|
123
123
|
## Mutation Standalone (Default) Output Format - CLEAN CODE ONLY
|
|
124
124
|
|
|
125
125
|
```javascript
|
|
126
|
-
|
|
126
|
+
import { gql } from 'api/graphql.ts';
|
|
127
|
+
const QUERY_NAME = gql`
|
|
127
128
|
mutation mutateEntity($input: EntityNameOperationInput!) {
|
|
128
129
|
uiapi {
|
|
129
130
|
EntityNameOperation(input: $input) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: install-feature
|
|
3
|
-
description: Install a feature into the current app. Use when the user asks to add a feature, capability, or functionality like authentication, search, charts, or navigation to their React web app.
|
|
3
|
+
description: Install a feature into the current app. Use when the user asks to add a feature, capability, or functionality like authentication, search, charts, or navigation to their React web app. Do this when user wants to do _anything_ to webapplications/webapps.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Install feature
|
|
@@ -17,10 +17,12 @@ Available features (npm packages):
|
|
|
17
17
|
| **Authentication** | `@salesforce/webapp-template-feature-react-authentication-experimental` | Login, register, password reset, protected routes |
|
|
18
18
|
| **Global search** | `@salesforce/webapp-template-feature-react-global-search-experimental` | Search Salesforce objects with filters and pagination |
|
|
19
19
|
| **Navigation menu** | `@salesforce/webapp-template-feature-react-nav-menu-experimental` | App layout with responsive navigation menu |
|
|
20
|
-
| **Analytics charts** | `@salesforce/webapp-template-feature-react-chart-experimental`
|
|
20
|
+
| **Analytics charts** | `@salesforce/webapp-template-feature-react-chart-experimental` | Recharts line/bar charts with theming (AnalyticsChart, ChartContainer) |
|
|
21
|
+
| **GraphQL data access**| `@salesforce/webapp-template-feature-graphql-experimental` | executeGraphQL utilities, codegen tooling, and example AccountsTable |
|
|
21
22
|
| **Shared UI (shadcn)** | `@salesforce/webapp-template-feature-react-shadcn-experimental` | Button, Card, Input, Select, Table, Tabs, etc. |
|
|
22
23
|
|
|
23
24
|
|
|
25
|
+
|
|
24
26
|
If no feature matches, tell the user and offer to build it from scratch following the project's existing patterns.
|
|
25
27
|
|
|
26
28
|
## 2. Install the npm package
|
|
@@ -31,12 +33,18 @@ npm install <package-name>
|
|
|
31
33
|
|
|
32
34
|
## 3. Copy skills and rules from the package
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
Run the script so skills and rules from the package are copied into your project. Pass `[skills-dir]` and `[rules-dir]` for your environment; the script reports what it copied.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Default (e.g. Cline): .cline/skills, .clinerules
|
|
40
|
+
bash <this-skill>/scripts/copy-feature-assets.sh <package-name>
|
|
35
41
|
|
|
36
|
-
|
|
37
|
-
-
|
|
42
|
+
# Agentforce: .a4drules/ ([docs](https://developer.salesforce.com/docs/platform/einstein-for-devs/guide/devagent-rules.html))
|
|
43
|
+
bash <this-skill>/scripts/copy-feature-assets.sh <package-name> .a4drules/skills .a4drules
|
|
38
44
|
|
|
39
|
-
|
|
45
|
+
# Cursor: .cursor/skills, .cursor/rules
|
|
46
|
+
bash <this-skill>/scripts/copy-feature-assets.sh <package-name> .cursor/skills .cursor/rules
|
|
47
|
+
```
|
|
40
48
|
|
|
41
49
|
## 4. Read the feature's exports and components
|
|
42
50
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Copies skills/ and rules/ from an installed npm package into the current project.
|
|
3
|
+
# Usage: bash <this-script> <package-name> [skills-dir] [rules-dir]
|
|
4
|
+
#
|
|
5
|
+
# Examples:
|
|
6
|
+
# bash copy-feature-assets.sh @salesforce/webapp-template-feature-graphql-experimental
|
|
7
|
+
# bash copy-feature-assets.sh @salesforce/webapp-template-feature-graphql-experimental .cursor/skills .cursor/rules
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
PKG="${1:?Usage: copy-feature-assets.sh <package-name> [skills-dir] [rules-dir]}"
|
|
11
|
+
SKILLS_DIR="${2:-.cline/skills}"
|
|
12
|
+
RULES_DIR="${3:-.clinerules}"
|
|
13
|
+
|
|
14
|
+
PKG_DIR="node_modules/$PKG"
|
|
15
|
+
|
|
16
|
+
if [ ! -d "$PKG_DIR" ]; then
|
|
17
|
+
echo "Error: Package not found at $PKG_DIR" >&2
|
|
18
|
+
echo "Run 'npm install $PKG' first." >&2
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
if [ -d "$PKG_DIR/skills" ] && [ "$(ls -A "$PKG_DIR/skills")" ]; then
|
|
23
|
+
mkdir -p "$SKILLS_DIR"
|
|
24
|
+
cp -r "$PKG_DIR"/skills/* "$SKILLS_DIR"/
|
|
25
|
+
echo "Copied skills → $SKILLS_DIR/"
|
|
26
|
+
else
|
|
27
|
+
echo "No skills/ found in $PKG_DIR — nothing to copy."
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
if [ -d "$PKG_DIR/rules" ] && [ "$(ls -A "$PKG_DIR/rules")" ]; then
|
|
31
|
+
mkdir -p "$RULES_DIR"
|
|
32
|
+
cp -r "$PKG_DIR"/rules/* "$RULES_DIR"/
|
|
33
|
+
echo "Copied rules → $RULES_DIR/"
|
|
34
|
+
else
|
|
35
|
+
echo "No rules/ found in $PKG_DIR — nothing to copy."
|
|
36
|
+
fi
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.27.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.27.0...v1.27.1) (2026-02-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.27.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.26.0...v1.27.0) (2026-02-12)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* defining graphql feature @W-20226218@ ([#83](https://github.com/salesforce-experience-platform-emu/webapps/issues/83)) ([51a9273](https://github.com/salesforce-experience-platform-emu/webapps/commit/51a92733063e1adf0c6e44ceab37162baddc2ffb))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [1.26.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.25.2...v1.26.0) (2026-02-11)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
@@ -5,69 +5,69 @@ import { resolve } from 'path';
|
|
|
5
5
|
import tailwindcss from '@tailwindcss/vite';
|
|
6
6
|
import salesforce from '@salesforce/vite-plugin-webapp-experimental';
|
|
7
7
|
export default defineConfig(function (_a) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
// Resolve aliases (shared between build and test)
|
|
18
|
-
resolve: {
|
|
19
|
-
alias: {
|
|
20
|
-
'@': path.resolve(__dirname, './src'),
|
|
21
|
-
'@api': path.resolve(__dirname, './src/api'),
|
|
22
|
-
'@components': path.resolve(__dirname, './src/components'),
|
|
23
|
-
'@utils': path.resolve(__dirname, './src/utils'),
|
|
24
|
-
'@styles': path.resolve(__dirname, './src/styles'),
|
|
25
|
-
'@assets': path.resolve(__dirname, './src/assets'),
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
// Vitest configuration
|
|
29
|
-
test: {
|
|
30
|
-
// Override root for tests (build uses src/pages as root)
|
|
31
|
-
root: resolve(__dirname),
|
|
32
|
-
// Use jsdom environment for React component testing
|
|
33
|
-
environment: 'jsdom',
|
|
34
|
-
// Setup files to run before each test
|
|
35
|
-
setupFiles: ['./src/test/setup.ts'],
|
|
36
|
-
// Global test patterns
|
|
37
|
-
include: [
|
|
38
|
-
'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
39
|
-
'src/**/__tests__/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
40
|
-
],
|
|
41
|
-
// Coverage configuration
|
|
42
|
-
coverage: {
|
|
43
|
-
provider: 'v8',
|
|
44
|
-
reporter: ['text', 'html', 'clover', 'json'],
|
|
45
|
-
exclude: [
|
|
46
|
-
'node_modules/',
|
|
47
|
-
'src/test/',
|
|
48
|
-
'src/**/*.d.ts',
|
|
49
|
-
'src/main.tsx',
|
|
50
|
-
'src/vite-env.d.ts',
|
|
51
|
-
'src/components/**/index.ts',
|
|
52
|
-
'**/*.config.ts',
|
|
53
|
-
'build/',
|
|
54
|
-
'dist/',
|
|
55
|
-
'coverage/',
|
|
56
|
-
'eslint.config.js',
|
|
57
|
-
],
|
|
58
|
-
thresholds: {
|
|
59
|
-
global: {
|
|
60
|
-
branches: 85,
|
|
61
|
-
functions: 85,
|
|
62
|
-
lines: 85,
|
|
63
|
-
statements: 85,
|
|
64
|
-
},
|
|
8
|
+
var mode = _a.mode;
|
|
9
|
+
return {
|
|
10
|
+
plugins: [tailwindcss(), react(), salesforce()],
|
|
11
|
+
// Build configuration for MPA
|
|
12
|
+
build: {
|
|
13
|
+
outDir: resolve(__dirname, 'dist'),
|
|
14
|
+
assetsDir: 'assets',
|
|
15
|
+
sourcemap: false,
|
|
65
16
|
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
17
|
+
// Resolve aliases (shared between build and test)
|
|
18
|
+
resolve: {
|
|
19
|
+
alias: {
|
|
20
|
+
'@': path.resolve(__dirname, './src'),
|
|
21
|
+
'@api': path.resolve(__dirname, './src/api'),
|
|
22
|
+
'@components': path.resolve(__dirname, './src/components'),
|
|
23
|
+
'@utils': path.resolve(__dirname, './src/utils'),
|
|
24
|
+
'@styles': path.resolve(__dirname, './src/styles'),
|
|
25
|
+
'@assets': path.resolve(__dirname, './src/assets'),
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
// Vitest configuration
|
|
29
|
+
test: {
|
|
30
|
+
// Override root for tests (build uses src/pages as root)
|
|
31
|
+
root: resolve(__dirname),
|
|
32
|
+
// Use jsdom environment for React component testing
|
|
33
|
+
environment: 'jsdom',
|
|
34
|
+
// Setup files to run before each test
|
|
35
|
+
setupFiles: ['./src/test/setup.ts'],
|
|
36
|
+
// Global test patterns
|
|
37
|
+
include: [
|
|
38
|
+
'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
39
|
+
'src/**/__tests__/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
40
|
+
],
|
|
41
|
+
// Coverage configuration
|
|
42
|
+
coverage: {
|
|
43
|
+
provider: 'v8',
|
|
44
|
+
reporter: ['text', 'html', 'clover', 'json'],
|
|
45
|
+
exclude: [
|
|
46
|
+
'node_modules/',
|
|
47
|
+
'src/test/',
|
|
48
|
+
'src/**/*.d.ts',
|
|
49
|
+
'src/main.tsx',
|
|
50
|
+
'src/vite-env.d.ts',
|
|
51
|
+
'src/components/**/index.ts',
|
|
52
|
+
'**/*.config.ts',
|
|
53
|
+
'build/',
|
|
54
|
+
'dist/',
|
|
55
|
+
'coverage/',
|
|
56
|
+
'eslint.config.js',
|
|
57
|
+
],
|
|
58
|
+
thresholds: {
|
|
59
|
+
global: {
|
|
60
|
+
branches: 85,
|
|
61
|
+
functions: 85,
|
|
62
|
+
lines: 85,
|
|
63
|
+
statements: 85,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
// Test timeout
|
|
68
|
+
testTimeout: 10000,
|
|
69
|
+
// Globals for easier testing
|
|
70
|
+
globals: true,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
73
|
});
|