@hubspot/ui-extensions-dev-server 0.8.15 → 0.8.16
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,6 +10,7 @@ interface SetupArguments {
|
|
|
10
10
|
api: string;
|
|
11
11
|
web: string;
|
|
12
12
|
};
|
|
13
|
+
setActiveApp: (appUid: string | undefined) => Promise<void>;
|
|
13
14
|
}
|
|
14
15
|
interface StartArguments {
|
|
15
16
|
accountId?: number;
|
|
@@ -36,7 +37,7 @@ declare class DevModeInterface {
|
|
|
36
37
|
isRunning?: boolean;
|
|
37
38
|
_generateAppExtensionMappings(components: ProjectComponentMap): AppExtensionMapping[];
|
|
38
39
|
_getPlatformVersion(projectConfig?: ProjectConfig): PlatformVersion;
|
|
39
|
-
setup({ components, onUploadRequired, promptUser, logger, urls, }: SetupArguments): Promise<void>;
|
|
40
|
+
setup({ components, onUploadRequired, promptUser, logger, urls, setActiveApp, }: SetupArguments): Promise<void>;
|
|
40
41
|
fileChange(filePath: string, __event: unknown): Promise<void>;
|
|
41
42
|
start({ requestPorts, accountId, projectConfig }: StartArguments): Promise<void>;
|
|
42
43
|
cleanup(): Promise<void>;
|
|
@@ -71,7 +71,8 @@ class DevModeInterface {
|
|
|
71
71
|
return (0, utils_1.throwUnhandledPlatformVersionError)(platformVersion);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
setup({ components, onUploadRequired, promptUser, logger, urls, }) {
|
|
74
|
+
setup({ components, onUploadRequired, promptUser, logger, urls, setActiveApp, }) {
|
|
75
|
+
var _a, _b, _c;
|
|
75
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
77
|
logger.debug('Setup function was invoked', { components, urls });
|
|
77
78
|
if (this.isConfigured) {
|
|
@@ -108,6 +109,9 @@ class DevModeInterface {
|
|
|
108
109
|
this.configs = answers.extensions;
|
|
109
110
|
}
|
|
110
111
|
this.isConfigured = true;
|
|
112
|
+
if (typeof setActiveApp === 'function') {
|
|
113
|
+
yield setActiveApp((_c = (_b = (_a = this.configs) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.appConfig) === null || _c === void 0 ? void 0 : _c.uid);
|
|
114
|
+
}
|
|
111
115
|
});
|
|
112
116
|
}
|
|
113
117
|
// The contract is for this to be async, so eslint can chill
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/ui-extensions-dev-server",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -21,12 +21,11 @@
|
|
|
21
21
|
".": "./dist/index.js"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
|
-
"dist"
|
|
25
|
-
"README.md"
|
|
24
|
+
"dist"
|
|
26
25
|
],
|
|
27
26
|
"license": "MIT",
|
|
28
27
|
"dependencies": {
|
|
29
|
-
"@hubspot/app-functions-dev-server": "
|
|
28
|
+
"@hubspot/app-functions-dev-server": "0.8.16",
|
|
30
29
|
"cors": "^2.8.5",
|
|
31
30
|
"detect-port": "1.5.1",
|
|
32
31
|
"estraverse": "^5.3.0",
|
|
@@ -64,5 +63,5 @@
|
|
|
64
63
|
"optional": true
|
|
65
64
|
}
|
|
66
65
|
},
|
|
67
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "706b594ee7fce544d7261eb8e16b73a77264b506"
|
|
68
67
|
}
|