@salesforce/webapp-template-base-react-app-experimental 1.35.1 → 1.36.0
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/CHANGELOG.md +12 -0
- package/package.json +3 -3
- package/src/force-app/main/default/webapplications/base-react-app/.graphqlrc.yml +2 -0
- package/src/force-app/main/default/webapplications/base-react-app/build/vite.config.js +19 -1
- package/src/force-app/main/default/webapplications/base-react-app/codegen.yml +12 -0
- package/src/force-app/main/default/webapplications/base-react-app/eslint.config.js +28 -0
- package/src/force-app/main/default/webapplications/base-react-app/package-lock.json +7958 -2310
- package/src/force-app/main/default/webapplications/base-react-app/package.json +16 -4
- package/src/force-app/main/default/webapplications/base-react-app/scripts/get-graphql-schema.mjs +68 -0
- package/src/force-app/main/default/webapplications/base-react-app/src/api/graphql-operations-types.ts +3 -1
- package/src/force-app/main/default/webapplications/base-react-app/src/api/utils/accounts.ts +33 -0
- package/src/force-app/main/default/webapplications/base-react-app/vite.config.ts +18 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.36.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.35.2...v1.36.0) (2026-02-19)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- move graphql eslint config and data sdk dependencies into base app ([#111](https://github.com/salesforce-experience-platform-emu/webapps/issues/111)) ([e9f6cb0](https://github.com/salesforce-experience-platform-emu/webapps/commit/e9f6cb066d45b2922a8c65769a7309ffd1345a2c))
|
|
11
|
+
|
|
12
|
+
## [1.35.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.35.1...v1.35.2) (2026-02-19)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- adding template tests in ci @W-20919457 ([#114](https://github.com/salesforce-experience-platform-emu/webapps/issues/114)) ([ebd3d5a](https://github.com/salesforce-experience-platform-emu/webapps/commit/ebd3d5a5d1d84d7ae69b216de82da4a09edb6cb8))
|
|
17
|
+
|
|
6
18
|
## [1.35.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.35.0...v1.35.1) (2026-02-18)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-base-react-app-experimental",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"test": "npm run test:build && npm run test:e2e",
|
|
14
14
|
"test:build": "cd src/force-app/main/default/webapplications/base-react-app && npm ci && npm run build",
|
|
15
|
-
"test:coverage": "npm run test
|
|
15
|
+
"test:coverage": "npm run test",
|
|
16
16
|
"test:e2e": "cd src/force-app/main/default/webapplications/base-react-app && rm -rf node_modules && npm ci && npx playwright install chromium && npm run build:e2e && npx playwright test"
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "b777854a57e42c3f676507c4b1ad27e23fbbd0d0"
|
|
19
19
|
}
|
|
@@ -4,12 +4,30 @@ import path from 'path';
|
|
|
4
4
|
import { resolve } from 'path';
|
|
5
5
|
import tailwindcss from '@tailwindcss/vite';
|
|
6
6
|
import salesforce from '@salesforce/vite-plugin-webapp-experimental';
|
|
7
|
+
import codegen from 'vite-plugin-graphql-codegen';
|
|
8
|
+
|
|
7
9
|
export default defineConfig(function (_a) {
|
|
8
10
|
var mode = _a.mode;
|
|
9
11
|
return {
|
|
10
12
|
// Ensure root base for e2e/static serve; plugin may override when deployed under a path
|
|
11
13
|
base: '/',
|
|
12
|
-
plugins: [
|
|
14
|
+
plugins: [
|
|
15
|
+
tailwindcss(),
|
|
16
|
+
react(),
|
|
17
|
+
salesforce(),
|
|
18
|
+
codegen({
|
|
19
|
+
// Path to the codegen config file
|
|
20
|
+
configFilePathOverride: resolve(__dirname, 'codegen.yml'),
|
|
21
|
+
// Run codegen on dev server start
|
|
22
|
+
runOnStart: true,
|
|
23
|
+
// Don't run codegen on build for now
|
|
24
|
+
runOnBuild: false,
|
|
25
|
+
// Enable file watcher during development
|
|
26
|
+
enableWatcher: true,
|
|
27
|
+
// Fail build if codegen errors
|
|
28
|
+
throwOnBuild: true,
|
|
29
|
+
}),
|
|
30
|
+
],
|
|
13
31
|
// Build configuration for MPA
|
|
14
32
|
build: {
|
|
15
33
|
outDir: resolve(__dirname, 'dist'),
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
schema: '../../../../../schema.graphql'
|
|
2
|
+
documents: 'src/**/*.{graphql,ts,tsx}'
|
|
3
|
+
generates:
|
|
4
|
+
src/api/graphql-operations-types.ts:
|
|
5
|
+
plugins:
|
|
6
|
+
- 'graphql-codegen-typescript-operation-types'
|
|
7
|
+
- 'typescript-operations'
|
|
8
|
+
config:
|
|
9
|
+
onlyOperationTypes: true
|
|
10
|
+
skipTypename: true
|
|
11
|
+
preResolveTypes: true
|
|
12
|
+
overwrite: true
|
|
@@ -5,6 +5,7 @@ import react from 'eslint-plugin-react';
|
|
|
5
5
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
6
6
|
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
7
7
|
import globals from 'globals';
|
|
8
|
+
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
|
|
8
9
|
|
|
9
10
|
export default [
|
|
10
11
|
// Global ignores
|
|
@@ -110,4 +111,31 @@ export default [
|
|
|
110
111
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
111
112
|
},
|
|
112
113
|
},
|
|
114
|
+
// GraphQL processor - extracts GraphQL from gql template literals in TS/TSX files
|
|
115
|
+
{
|
|
116
|
+
files: ['**/*.{ts,tsx}'],
|
|
117
|
+
processor: graphqlPlugin.processor,
|
|
118
|
+
},
|
|
119
|
+
// GraphQL linting configuration for .graphql files
|
|
120
|
+
{
|
|
121
|
+
files: ['**/*.graphql'],
|
|
122
|
+
languageOptions: {
|
|
123
|
+
parser: graphqlPlugin.parser,
|
|
124
|
+
parserOptions: {
|
|
125
|
+
graphQLConfig: {
|
|
126
|
+
schema: '../../../../../schema.graphql',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
plugins: {
|
|
131
|
+
'@graphql-eslint': graphqlPlugin,
|
|
132
|
+
},
|
|
133
|
+
rules: {
|
|
134
|
+
'@graphql-eslint/no-anonymous-operations': 'error',
|
|
135
|
+
'@graphql-eslint/no-duplicate-fields': 'error',
|
|
136
|
+
'@graphql-eslint/known-fragment-names': 'error',
|
|
137
|
+
'@graphql-eslint/no-undefined-variables': 'error',
|
|
138
|
+
'@graphql-eslint/no-unused-variables': 'error',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
113
141
|
];
|