@salesforce/vite-plugin-ui-bundle 1.120.2 → 1.120.3
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/index.d.ts.map +1 -1
- package/dist/index.js +10 -5
- package/package.json +2 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAqB,MAAM,EAAiB,MAAM,MAAM,CAAC;AAUrE,MAAM,WAAW,aAAa;IAC7B,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAqB,MAAM,EAAiB,MAAM,MAAM,CAAC;AAUrE,MAAM,WAAW,aAAa;IAC7B,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,OAAO,GAAE,aAAkB,GAAG,MAAM,EAAE,CAiR5E"}
|
package/dist/index.js
CHANGED
|
@@ -99,16 +99,15 @@ function getCodeBuilderBasePath(proxyUri, port) {
|
|
|
99
99
|
return `/absproxy/${port}`;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
function getDevServerTarget(
|
|
103
|
-
if (
|
|
104
|
-
return getCodeBuilderBasePath(
|
|
102
|
+
function getDevServerTarget(codeBuilderProxyUrl, port) {
|
|
103
|
+
if (codeBuilderProxyUrl) {
|
|
104
|
+
return getCodeBuilderBasePath(codeBuilderProxyUrl, port);
|
|
105
105
|
}
|
|
106
106
|
return `http://localhost:${port}`;
|
|
107
107
|
}
|
|
108
108
|
function getPort() {
|
|
109
109
|
return parseInt(process.env.SF_UIBUNDLE_PORT || DEFAULT_PORT.toString(), 10);
|
|
110
110
|
}
|
|
111
|
-
const codeBuilderProxyUrl = process.env.CODE_BUILDER_FRAMEWORK_PROXY_URI;
|
|
112
111
|
function uiBundlePlugin(options = {}) {
|
|
113
112
|
const proxyOptions = {
|
|
114
113
|
debug: options.debug ?? false
|
|
@@ -118,6 +117,7 @@ function uiBundlePlugin(options = {}) {
|
|
|
118
117
|
let environment;
|
|
119
118
|
let proxyHandler;
|
|
120
119
|
let designModeEnabled = options.designMode ?? false;
|
|
120
|
+
let codeBuilderProxyUrl;
|
|
121
121
|
const corePlugin = {
|
|
122
122
|
name: "@salesforce/vite-plugin-ui-bundle:core",
|
|
123
123
|
enforce: "pre",
|
|
@@ -132,17 +132,22 @@ function uiBundlePlugin(options = {}) {
|
|
|
132
132
|
} catch {
|
|
133
133
|
version = DEFAULT_API_VERSION;
|
|
134
134
|
}
|
|
135
|
+
codeBuilderProxyUrl = process.env.CODE_BUILDER_FRAMEWORK_PROXY_URI;
|
|
135
136
|
const isCodeBuilder = !!codeBuilderProxyUrl;
|
|
136
137
|
const define = {
|
|
137
138
|
__SF_API_VERSION__: JSON.stringify(version)
|
|
138
139
|
};
|
|
140
|
+
let base = "./";
|
|
139
141
|
if (env.mode !== "production") {
|
|
140
142
|
const basePath = isCodeBuilder ? getCodeBuilderBasePath(codeBuilderProxyUrl, getPort()) : "/";
|
|
141
143
|
environment = { basePath, apiPath: basePath };
|
|
144
|
+
if (isCodeBuilder) {
|
|
145
|
+
base = basePath;
|
|
146
|
+
}
|
|
142
147
|
}
|
|
143
148
|
return {
|
|
144
149
|
define,
|
|
145
|
-
base
|
|
150
|
+
base,
|
|
146
151
|
server: {
|
|
147
152
|
port: getPort(),
|
|
148
153
|
// Code Builder specific configuration
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/vite-plugin-ui-bundle",
|
|
3
3
|
"description": "Vite plugin for Salesforce UI Bundles",
|
|
4
|
-
"version": "1.120.
|
|
4
|
+
"version": "1.120.3",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/core": "^7.28.4",
|
|
30
30
|
"@babel/helper-plugin-utils": "^7.28.3",
|
|
31
|
-
"@salesforce/ui-bundle": "^1.120.
|
|
31
|
+
"@salesforce/ui-bundle": "^1.120.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/babel__core": "^7.20.5",
|