@sprucelabs/spruce-heartwood-utils 7.1.4 → 7.2.2
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/build/esm/viewControllers/RemoteViewControllerFactory.d.ts +1 -1
- package/build/esm/viewControllers/RemoteViewControllerFactory.js +3 -3
- package/build/viewControllers/RemoteViewControllerFactory.d.ts +1 -1
- package/build/viewControllers/RemoteViewControllerFactory.js +3 -3
- package/package.json +1 -1
|
@@ -20,6 +20,6 @@ export default class RemoteViewControllerFactory implements Factory {
|
|
|
20
20
|
getController(name: string): any;
|
|
21
21
|
fetchRemoteController(name: string): Promise<any>;
|
|
22
22
|
RemoteController(name: string, options: Record<string, any>): Promise<any>;
|
|
23
|
-
private
|
|
23
|
+
private optionallyLoadController;
|
|
24
24
|
}
|
|
25
25
|
export {};
|
|
@@ -34,17 +34,17 @@ export default class RemoteViewControllerFactory {
|
|
|
34
34
|
}
|
|
35
35
|
fetchRemoteController(name) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
yield this.
|
|
37
|
+
yield this.optionallyLoadController(name);
|
|
38
38
|
return this.vcFactory.getController(name);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
RemoteController(name, options) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
yield this.
|
|
43
|
+
yield this.optionallyLoadController(name);
|
|
44
44
|
return this.vcFactory.Controller(name, options);
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
optionallyLoadController(name) {
|
|
48
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
49
|
const namespace = this.getNamespace(name);
|
|
50
50
|
if (!this.hasController(name) && namespace) {
|
|
@@ -20,6 +20,6 @@ export default class RemoteViewControllerFactory implements Factory {
|
|
|
20
20
|
getController(name: string): any;
|
|
21
21
|
fetchRemoteController(name: string): Promise<any>;
|
|
22
22
|
RemoteController(name: string, options: Record<string, any>): Promise<any>;
|
|
23
|
-
private
|
|
23
|
+
private optionallyLoadController;
|
|
24
24
|
}
|
|
25
25
|
export {};
|
|
@@ -26,14 +26,14 @@ class RemoteViewControllerFactory {
|
|
|
26
26
|
return this.vcFactory.getController(name);
|
|
27
27
|
}
|
|
28
28
|
async fetchRemoteController(name) {
|
|
29
|
-
await this.
|
|
29
|
+
await this.optionallyLoadController(name);
|
|
30
30
|
return this.vcFactory.getController(name);
|
|
31
31
|
}
|
|
32
32
|
async RemoteController(name, options) {
|
|
33
|
-
await this.
|
|
33
|
+
await this.optionallyLoadController(name);
|
|
34
34
|
return this.vcFactory.Controller(name, options);
|
|
35
35
|
}
|
|
36
|
-
async
|
|
36
|
+
async optionallyLoadController(name) {
|
|
37
37
|
const namespace = this.getNamespace(name);
|
|
38
38
|
if (!this.hasController(name) && namespace) {
|
|
39
39
|
const client = await this.connectToApi();
|