@rws-framework/client 2.9.17 → 2.9.18

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rws-framework/client",
3
3
  "private": false,
4
- "version": "2.9.17",
4
+ "version": "2.9.18",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
7
7
  "docs": "typedoc --tsconfig ./tsconfig.json"
@@ -94,7 +94,7 @@
94
94
  "tsc-watch": "^6.0.4",
95
95
  "tslib": "^2.6.2",
96
96
  "uglify-js": "^3.17.4",
97
- "webpack": "^5.75.0",
97
+ "webpack": "^5.86.0",
98
98
  "webpack-bundle-analyzer": "^4.10.1",
99
99
  "webpack-cli": "^5.1.4",
100
100
  "webpack-dev-server": "^4.15.1",
@@ -80,10 +80,6 @@ const RWSWebpackWrapper = async (config) => {
80
80
  resourceRegExp: /.*\.es6\.js$/,
81
81
  contextRegExp: /node_modules/
82
82
  }),
83
- // new ESBuildPlugin({
84
- // 'process.env._RWS_DEFAULTS': JSON.stringify(BuildConfigurator.exportDefaultConfig()),
85
- // 'process.env._RWS_BUILD_OVERRIDE': JSON.stringify(BuildConfigurator.exportBuildConfig())
86
- // })
87
83
  ];
88
84
 
89
85
  const WEBPACK_AFTER_ACTIONS = config.actions || [];
@@ -104,6 +104,10 @@ async function setup(this: RWSClientInstance, config: IRWSConfig = {}): Promise<
104
104
  }
105
105
  }
106
106
 
107
+ if(config?.user){
108
+ this.setUser(config.user);
109
+ }
110
+
107
111
  if (this.appConfig.get('parted')) {
108
112
  const componentParts = await this.loadPartedComponents();
109
113
 
@@ -127,6 +131,10 @@ async function start(this: RWSClientInstance, config: IRWSConfig = {}): Promise<
127
131
  this.appConfig.mergeConfig(this.config);
128
132
  }
129
133
 
134
+ if(!this.user && config?.user){
135
+ this.setUser(config.user);
136
+ }
137
+
130
138
  if (this.config.user && !this.config.dontPushToSW) {
131
139
  this.pushUserToServiceWorker(this.user);
132
140
  }
package/src/client.ts CHANGED
@@ -204,6 +204,7 @@ class RWSClient {
204
204
 
205
205
  logout(){
206
206
  this.user = null;
207
+ localStorage.removeItem('the_rws_user');
207
208
  }
208
209
  }
209
210