@rws-framework/client 2.9.18 → 2.9.20
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/cfg/tsconfigSetup.js +3 -3
- package/package.json +1 -1
- package/src/client/components.ts +2 -0
- package/src/client/config.ts +8 -5
- package/src/client.ts +1 -0
- package/tsconfig.json +1 -1
package/cfg/tsconfigSetup.js
CHANGED
|
@@ -35,7 +35,7 @@ function setupTsConfig(tsConfigPath, executionDir) {
|
|
|
35
35
|
tsConfig['include'] = [];
|
|
36
36
|
} else {
|
|
37
37
|
tsConfig['include'] = tsConfig['include'].filter((inc) => {
|
|
38
|
-
if(inc === 'src'){
|
|
38
|
+
if(inc === 'src/index.ts'){
|
|
39
39
|
return true;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -44,9 +44,9 @@ function setupTsConfig(tsConfigPath, executionDir) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
if (!tsConfig['include'].includes('src')) {
|
|
47
|
+
if (!tsConfig['include'].includes('src/index.ts')) {
|
|
48
48
|
console.log(chalk.blueBright('[RWS TS CONFIG]'), 'adding RWS project typescript code to project tsconfig.json');
|
|
49
|
-
tsConfig['include'].unshift('src');
|
|
49
|
+
tsConfig['include'].unshift('src/index.ts');
|
|
50
50
|
changed = true;
|
|
51
51
|
}
|
|
52
52
|
|
package/package.json
CHANGED
package/src/client/components.ts
CHANGED
|
@@ -41,6 +41,8 @@ async function loadPartedComponents(this: RWSClientInstance): Promise<RWSInfoTyp
|
|
|
41
41
|
function defineAllComponents() {
|
|
42
42
|
const richWindowComponents: RWSWindowComponentRegister = (window as Window & RWSWindow).RWS.components;
|
|
43
43
|
|
|
44
|
+
console.log({richWindowComponents})
|
|
45
|
+
|
|
44
46
|
Object.keys(richWindowComponents).map(key => richWindowComponents[key].component).forEach((el: IWithCompose<RWSViewComponent>) => {
|
|
45
47
|
el.define(el as any, el.definition);
|
|
46
48
|
});
|
package/src/client/config.ts
CHANGED
|
@@ -122,17 +122,20 @@ async function setup(this: RWSClientInstance, config: IRWSConfig = {}): Promise<
|
|
|
122
122
|
|
|
123
123
|
async function start(this: RWSClientInstance, config: IRWSConfig = {}): Promise<RWSClientInstance> {
|
|
124
124
|
this.config = { ...this.config, ...config };
|
|
125
|
-
|
|
125
|
+
|
|
126
126
|
if (!this.isSetup) {
|
|
127
127
|
this.config = await this.setup(this.config);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
if (Object.keys(config).length) {
|
|
131
131
|
this.appConfig.mergeConfig(this.config);
|
|
132
|
-
}
|
|
132
|
+
}
|
|
133
133
|
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
const setThisUser = config?.user || this.getUser();
|
|
135
|
+
|
|
136
|
+
if(setThisUser){
|
|
137
|
+
this.config.user = setThisUser;
|
|
138
|
+
this.setUser(setThisUser);
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
if (this.config.user && !this.config.dontPushToSW) {
|
|
@@ -141,7 +144,7 @@ async function start(this: RWSClientInstance, config: IRWSConfig = {}): Promise<
|
|
|
141
144
|
|
|
142
145
|
await this.initCallback();
|
|
143
146
|
|
|
144
|
-
for (const plugin of RWSPlugin.getAllPlugins()){
|
|
147
|
+
for (const plugin of RWSPlugin.getAllPlugins()){
|
|
145
148
|
await plugin.onClientStart();
|
|
146
149
|
}
|
|
147
150
|
|
package/src/client.ts
CHANGED