@salesforce/webapp-experimental 1.48.3 → 1.50.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/dist/proxy/routing.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface RouteMatch {
|
|
|
14
14
|
* Match URL path against routing rules
|
|
15
15
|
*
|
|
16
16
|
* @param pathname - The URL pathname to match
|
|
17
|
+
* @param basePath - Optional base path of Salesforce server
|
|
17
18
|
* @param rewrites - Optional array of rewrite rules
|
|
18
19
|
* @param redirects - Optional array of redirect rules
|
|
19
20
|
* @returns Route match result indicating the type and target, or null if no match
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/proxy/routing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEjE,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,KAAK,GAAG,KAAK,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AASD
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/proxy/routing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEjE,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,KAAK,GAAG,KAAK,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AASD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACzB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,WAAW,EAAE,EACxB,SAAS,CAAC,EAAE,YAAY,EAAE,GACxB,UAAU,GAAG,IAAI,CAiEnB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAMpF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GACzC,MAAM,CAiBR"}
|
package/dist/proxy/routing.js
CHANGED
|
@@ -15,13 +15,15 @@ function normalizeRoute(route) {
|
|
|
15
15
|
* Match URL path against routing rules
|
|
16
16
|
*
|
|
17
17
|
* @param pathname - The URL pathname to match
|
|
18
|
+
* @param basePath - Optional base path of Salesforce server
|
|
18
19
|
* @param rewrites - Optional array of rewrite rules
|
|
19
20
|
* @param redirects - Optional array of redirect rules
|
|
20
21
|
* @returns Route match result indicating the type and target, or null if no match
|
|
21
22
|
*/
|
|
22
23
|
export function matchRoute(pathname, basePath, rewrites, redirects) {
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
// under services, only allow graphql and ui-api
|
|
25
|
+
const servicesRegex = new RegExp(`^${basePath || ""}/services/data/v\\d{2}\\.\\d/(graphql|ui-api)`);
|
|
26
|
+
if (servicesRegex.test(pathname) || pathname.startsWith(`${basePath || ""}/lwr/apex/v`)) {
|
|
25
27
|
return { type: "api" };
|
|
26
28
|
}
|
|
27
29
|
if (pathname.startsWith(`${basePath || ""}/gql/endpoint`)) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-experimental",
|
|
3
3
|
"description": "[experimental] Core package for Salesforce Web Applications",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.50.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@salesforce/core": "^8.23.4",
|
|
48
|
-
"@salesforce/sdk-data": "^1.
|
|
48
|
+
"@salesforce/sdk-data": "^1.50.0",
|
|
49
49
|
"axios": "^1.7.7",
|
|
50
50
|
"micromatch": "^4.0.8",
|
|
51
51
|
"path-to-regexp": "^8.3.0"
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "e31c5fd587a5b2a135788724b32058008b11785a"
|
|
65
65
|
}
|