@rws-framework/client 2.10.15 → 2.11.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.
|
@@ -10,8 +10,13 @@ function processEnvDefines(BuildConfigurator, config, devDebug) {
|
|
|
10
10
|
const rwsDefines = BuildConfigurator.get('rwsDefines') || config.rwsDefines || null;
|
|
11
11
|
|
|
12
12
|
if (rwsDefines) {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
for (const defineKey of Object.keys(rwsDefines)){
|
|
14
|
+
_rws_defines = {
|
|
15
|
+
..._rws_defines,
|
|
16
|
+
['process.env.' + defineKey]: JSON.stringify(rwsDefines[defineKey])
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
15
20
|
|
|
16
21
|
return _rws_defines;
|
|
17
22
|
}
|
package/package.json
CHANGED
package/rws.webpack.config.js
CHANGED
|
@@ -68,11 +68,6 @@ const RWSWebpackWrapper = async (rwsFrontendConfig) => {
|
|
|
68
68
|
let optimConfig = null;
|
|
69
69
|
let aliases = rwsFrontendConfig.aliases || {};
|
|
70
70
|
|
|
71
|
-
console.log({
|
|
72
|
-
__filename,
|
|
73
|
-
_packageDir
|
|
74
|
-
});
|
|
75
|
-
|
|
76
71
|
aliases = { ...aliases, ...loadAliases(__dirname, path.resolve(_MAIN_PACKAGE, 'node_modules'), executionDir) }
|
|
77
72
|
|
|
78
73
|
// #SECTION PLUGIN STARTING HOOKS
|
|
@@ -80,6 +80,11 @@ class ApiService extends TheService {
|
|
|
80
80
|
this.token = token;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
getToken(): string
|
|
84
|
+
{
|
|
85
|
+
return this.token;
|
|
86
|
+
}
|
|
87
|
+
|
|
83
88
|
public async pureGet(url: string, options: IAPIOptions = {}): Promise<string> {
|
|
84
89
|
try {
|
|
85
90
|
const response = await fetch(url, {
|
|
@@ -193,6 +198,8 @@ class ApiService extends TheService {
|
|
|
193
198
|
apiPath = apiPath.replace(`:${paramKey}`, paramValue);
|
|
194
199
|
});
|
|
195
200
|
|
|
201
|
+
console.log('bck', this.config.get('backendUrl'));
|
|
202
|
+
|
|
196
203
|
return `${this.config.get('backendUrl')}${this.config.get('apiPrefix') || ''}${apiPath}`;
|
|
197
204
|
}
|
|
198
205
|
|