@hubspot/ui-extensions-dev-server 0.8.50 → 0.8.53
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.
|
@@ -65,6 +65,10 @@ class DevModeUnifiedInterface extends DevModeParentInterface_1.DevModeParentInte
|
|
|
65
65
|
const extension = components[extensionUid];
|
|
66
66
|
// Update the extension entrypoint to be "relative" to the extension directory (eg from /app/card/card.jsx to ./card.jsx)
|
|
67
67
|
extension.config.entrypoint = `./${path_1.default.basename(extension.config.entrypoint)}`;
|
|
68
|
+
// Hardcode the extension name if this is a settings extension (the user does not provide a name for their settings card).
|
|
69
|
+
if (extension.componentType === types_1.UnifiedComponentTypes.SETTINGS) {
|
|
70
|
+
extension.config.name = 'Settings';
|
|
71
|
+
}
|
|
68
72
|
// Add them to the app config
|
|
69
73
|
switch (extension.componentType) {
|
|
70
74
|
case types_1.UnifiedComponentTypes.CARD:
|
package/dist/lib/ast.js
CHANGED
|
@@ -132,15 +132,10 @@ function _collectDataDependencies(node, output, logger) {
|
|
|
132
132
|
// Then we handle each hook individually, as the usages and tracking format are different.
|
|
133
133
|
if (hookName === 'useCrmProperties') {
|
|
134
134
|
const propertyType = 'CrmRecordProperties';
|
|
135
|
-
//
|
|
136
|
-
|
|
137
|
-
logger.warn('useCrmProperties called without actions parameter');
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
// Get the second argument, the properties array
|
|
141
|
-
const propertiesNode = node.arguments[1];
|
|
135
|
+
// Get the first argument, the properties array
|
|
136
|
+
const propertiesNode = node.arguments[0];
|
|
142
137
|
const requestedProperties = [];
|
|
143
|
-
// If the
|
|
138
|
+
// If the first argument is an array with at least one element, collect the properties.
|
|
144
139
|
if (propertiesNode &&
|
|
145
140
|
propertiesNode.type === 'ArrayExpression' &&
|
|
146
141
|
propertiesNode.elements.length > 0) {
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -28,5 +28,6 @@ export declare const PLATFORM_VERSION: {
|
|
|
28
28
|
export declare const PUBLIC_APP = "public-app";
|
|
29
29
|
export declare const PRIVATE_APP = "private-app";
|
|
30
30
|
export declare const CARD_EXTENSION = "CARD";
|
|
31
|
+
export declare const SETTINGS_EXTENSION = "SETTINGS";
|
|
31
32
|
export declare const SUPPORTED_APP_TYPES: string[];
|
|
32
33
|
export declare const SUPPORTED_EXTENSION_TYPES: string[];
|
package/dist/lib/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SUPPORTED_EXTENSION_TYPES = exports.SUPPORTED_APP_TYPES = exports.CARD_EXTENSION = exports.PRIVATE_APP = exports.PUBLIC_APP = exports.PLATFORM_VERSION = exports.SERVER_CAPABILITIES = exports.PROXY_CAPABILITY = exports.WEBSOCKET_MESSAGE_VERSION = exports.EXTENSIONS_MESSAGE_VERSION = exports.ROLLUP_OPTIONS = exports.WEBSOCKET_DEFAULT_PORT = exports.EXPRESS_DEFAULT_PORT = exports.VITE_DEV_SERVER_ID = exports.EXPRESS_SERVER_ID = exports.MANIFEST_FILE = exports.OUTPUT_DIR = void 0;
|
|
3
|
+
exports.SUPPORTED_EXTENSION_TYPES = exports.SUPPORTED_APP_TYPES = exports.SETTINGS_EXTENSION = exports.CARD_EXTENSION = exports.PRIVATE_APP = exports.PUBLIC_APP = exports.PLATFORM_VERSION = exports.SERVER_CAPABILITIES = exports.PROXY_CAPABILITY = exports.WEBSOCKET_MESSAGE_VERSION = exports.EXTENSIONS_MESSAGE_VERSION = exports.ROLLUP_OPTIONS = exports.WEBSOCKET_DEFAULT_PORT = exports.EXPRESS_DEFAULT_PORT = exports.VITE_DEV_SERVER_ID = exports.EXPRESS_SERVER_ID = exports.MANIFEST_FILE = exports.OUTPUT_DIR = void 0;
|
|
4
4
|
exports.OUTPUT_DIR = 'dist';
|
|
5
5
|
exports.MANIFEST_FILE = 'manifest.json';
|
|
6
6
|
exports.EXPRESS_SERVER_ID = 'ui-extensions-dev-server';
|
|
@@ -40,5 +40,6 @@ exports.PUBLIC_APP = 'public-app';
|
|
|
40
40
|
// eslint-disable-next-line hubspot-dev/no-private-classes
|
|
41
41
|
exports.PRIVATE_APP = 'private-app';
|
|
42
42
|
exports.CARD_EXTENSION = 'CARD';
|
|
43
|
+
exports.SETTINGS_EXTENSION = 'SETTINGS';
|
|
43
44
|
exports.SUPPORTED_APP_TYPES = [exports.PUBLIC_APP, exports.PRIVATE_APP];
|
|
44
|
-
exports.SUPPORTED_EXTENSION_TYPES = [exports.CARD_EXTENSION];
|
|
45
|
+
exports.SUPPORTED_EXTENSION_TYPES = [exports.CARD_EXTENSION, exports.SETTINGS_EXTENSION];
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -130,10 +130,11 @@ export type UnifiedCardConfig = {
|
|
|
130
130
|
};
|
|
131
131
|
export declare enum UnifiedComponentTypes {
|
|
132
132
|
CARD = "CARD",
|
|
133
|
-
APPLICATION = "APPLICATION"
|
|
133
|
+
APPLICATION = "APPLICATION",
|
|
134
|
+
SETTINGS = "SETTINGS"
|
|
134
135
|
}
|
|
135
136
|
export type UnifiedExtensionComponent = Omit<UnifiedCardConfig, 'type'> & {
|
|
136
|
-
componentType: UnifiedComponentTypes.CARD;
|
|
137
|
+
componentType: UnifiedComponentTypes.CARD | UnifiedComponentTypes.SETTINGS;
|
|
137
138
|
componentDeps: {
|
|
138
139
|
app: string;
|
|
139
140
|
};
|
package/dist/lib/types.js
CHANGED
|
@@ -10,4 +10,5 @@ var UnifiedComponentTypes;
|
|
|
10
10
|
(function (UnifiedComponentTypes) {
|
|
11
11
|
UnifiedComponentTypes["CARD"] = "CARD";
|
|
12
12
|
UnifiedComponentTypes["APPLICATION"] = "APPLICATION";
|
|
13
|
+
UnifiedComponentTypes["SETTINGS"] = "SETTINGS";
|
|
13
14
|
})(UnifiedComponentTypes || (exports.UnifiedComponentTypes = UnifiedComponentTypes = {}));
|
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.53",
|
|
4
4
|
"description": "",
|
|
5
5
|
"bin": {
|
|
6
6
|
"uie": "./dist/lib/bin/cli.js"
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"optional": true
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "2bad593e0b073687424cd1d365f68849fb448940"
|
|
73
73
|
}
|