@genesislcap/build-kit 14.251.3 → 14.251.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/dist/utils/proxy.d.ts.map +1 -1
- package/dist/utils/proxy.js +7 -4
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/utils/proxy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD;;GAEG;AACH,eAAO,MAAM,OAAO,wBAAkB,MACwC,CAAC;AAE/E;;GAEG;AACH,eAAO,MAAM,uBAAuB,mDAGnC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IAC5D,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,EAAE,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc,WAAY,cAAc,KAAG,UAAU,GAAG,SAmBpE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB,YAAY,gBAAgB,KAAQ,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/utils/proxy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD;;GAEG;AACH,eAAO,MAAM,OAAO,wBAAkB,MACwC,CAAC;AAE/E;;GAEG;AACH,eAAO,MAAM,uBAAuB,mDAGnC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IAC5D,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,EAAE,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc,WAAY,cAAc,KAAG,UAAU,GAAG,SAmBpE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB,YAAY,gBAAgB,KAAQ,UAAU,GAAG,SAqC7E,CAAC;AAEF,eAAO,MAAM,qBAAqB,YAAY,gBAAgB,KAAQ,aAAa,EAWlF,CAAC"}
|
package/dist/utils/proxy.js
CHANGED
|
@@ -79,16 +79,19 @@ const createDevProxies = (config = {}) => {
|
|
|
79
79
|
if (!config.target && !process.env.API_HOST) {
|
|
80
80
|
return undefined;
|
|
81
81
|
}
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
const
|
|
82
|
+
const apiPrefix = process.env.SOCKET_EXT || 'gwf';
|
|
83
|
+
const publicPath = process.env.PUBLIC_PATH || '/';
|
|
84
|
+
const apiBasePath = `${publicPath}${apiPrefix}`;
|
|
85
|
+
const paths = Array.isArray(config.paths) ? config.paths : ['/sm', '/sso', apiBasePath];
|
|
86
|
+
const target = (_a = config.target) !== null && _a !== void 0 ? _a : (0, exports.convertWsEndpointToHTTP)(process.env.API_HOST, apiPrefix);
|
|
85
87
|
const defaultConfig = Object.assign(Object.assign({}, config), { target });
|
|
86
88
|
const proxies = paths.reduce((prev, curr) => (Object.assign(Object.assign({}, prev), (0, exports.createDevProxy)(Object.assign(Object.assign({}, defaultConfig), { path: curr })))), {});
|
|
87
89
|
// if we are pointing to locally running server instead of nginx
|
|
88
90
|
// we need to rewrite path to top level to replicate what nginx would do
|
|
89
91
|
if ((_b = process.env.API_HOST) === null || _b === void 0 ? void 0 : _b.includes('localhost')) {
|
|
92
|
+
// we keep /sm for backward compatibility, but it should not be used going forward
|
|
90
93
|
proxies['/sm'].pathRewrite = { '^/sm': '' };
|
|
91
|
-
proxies[
|
|
94
|
+
proxies[apiBasePath].pathRewrite = { [`^${apiBasePath}`]: '' };
|
|
92
95
|
}
|
|
93
96
|
if (Object.keys(proxies).length) {
|
|
94
97
|
consola_1.default.info('Dev Proxies:');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/build-kit",
|
|
3
3
|
"description": "Build utilities & types",
|
|
4
|
-
"version": "14.251.
|
|
4
|
+
"version": "14.251.4",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@esbuild-kit/cjs-loader": "2.4.2",
|
|
40
|
-
"@genesislcap/foundation-testing": "14.251.
|
|
40
|
+
"@genesislcap/foundation-testing": "14.251.4",
|
|
41
41
|
"@types/http-proxy": "^1.17.8",
|
|
42
42
|
"@types/node": "^20.8.7",
|
|
43
43
|
"tsm": "^2.2.1",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "f066febff14751fbe019f0b5645a4a844ee32775"
|
|
56
56
|
}
|