@hubspot/ui-extensions-dev-server 0.8.0 → 0.8.1

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.
@@ -1,9 +1,8 @@
1
1
  import { AppConfig, ExtensionConfigMap } from '../lib/types';
2
- declare function loadConfigByPath(configPath: string): any;
3
- declare function loadExtensionConfig(appConfig: AppConfig, appPath: string): ExtensionConfigMap;
2
+ export declare function loadConfigByPath<T = unknown>(configPath: string): T;
3
+ export declare function loadExtensionConfig(appConfig: AppConfig, appPath: string): ExtensionConfigMap;
4
4
  /**
5
5
  * @deprecated Will be removed after integration with hubspot-cli is complete
6
6
  * This version of load config makes assumptions about the location it is being ran from where the others do not
7
7
  */
8
- declare function loadConfig(): ExtensionConfigMap;
9
- export { loadConfigByPath, loadExtensionConfig, loadConfig };
8
+ export declare function loadConfig(): ExtensionConfigMap;
@@ -26,7 +26,8 @@ function loadExtensionConfig(appConfig, appPath) {
26
26
  const cardConfigDir = path_1.default.parse(cardConfigPath).dir;
27
27
  const entryPointPath = path_1.default.join(cardConfigDir, (_b = (_a = cardConfig.data) === null || _a === void 0 ? void 0 : _a.module) === null || _b === void 0 ? void 0 : _b.file);
28
28
  cardConfig.data.module.file = entryPointPath;
29
- outputConfig[entryPointPath] = Object.assign(Object.assign({}, cardConfig), { output: (0, utils_1.getUrlSafeFileName)(entryPointPath), path: appPath, extensionPath: path_1.default.parse(entryPointPath).dir, data: Object.assign(Object.assign({}, cardConfig.data), { appName: appConfig.name }) });
29
+ const sourceId = (0, utils_1.buildSourceId)(appConfig, cardConfig);
30
+ outputConfig[sourceId || `${entryPointPath}-${cardConfig.data.location}`] = Object.assign(Object.assign({}, cardConfig), { output: (0, utils_1.getUrlSafeFileName)(entryPointPath), path: appPath, extensionPath: path_1.default.parse(entryPointPath).dir, data: Object.assign(Object.assign({}, cardConfig.data), { appName: appConfig.name, sourceId }) });
30
31
  }
31
32
  }
32
33
  catch (e) {
package/dist/cli/run.js CHANGED
@@ -22,7 +22,7 @@ const inquirer_1 = __importDefault(require("inquirer"));
22
22
  const config_1 = require("./config");
23
23
  // eslint-disable-next-line no-floating-promise/no-floating-promise
24
24
  (() => __awaiter(void 0, void 0, void 0, function* () {
25
- const { DEV_MODE, BUILD_MODE, extension, help, force } = (0, utils_1.parseArgs)();
25
+ const { DEV_MODE, BUILD_MODE, extension, location, help, force, account, } = (0, utils_1.parseArgs)();
26
26
  if (!force) {
27
27
  console.warn((0, console_log_colors_1.yellow)(`"hs-ui-extensions-dev-server" is deprecated, please use "hs project dev" for local development.
28
28
  \nSee our Getting Started guide for detailed instructions: https://app.hubspot.com/l/docs/doc/platform/create-a-project-for-ui-extensions\n`));
@@ -38,8 +38,20 @@ const config_1 = require("./config");
38
38
  let extensionConfig;
39
39
  if (extension) {
40
40
  const allExtensionsConfig = (0, config_1.loadExtensionConfig)(appConfig, appPath);
41
- extensionConfig =
42
- allExtensionsConfig[path_1.default.join(extensionPath, extension)];
41
+ const matchingConfigs = Object.values(allExtensionsConfig).filter(config => {
42
+ const entrypoint = path_1.default.parse(config.data.module.file).base;
43
+ return entrypoint === path_1.default.join(extension);
44
+ });
45
+ if (matchingConfigs.length === 1) {
46
+ extensionConfig = matchingConfigs[0];
47
+ }
48
+ else if (matchingConfigs.length > 1 && location) {
49
+ // We need to do some tie breaking
50
+ const filteredByLocation = matchingConfigs.filter(config => config.data.location === location);
51
+ if (filteredByLocation.length === 1) {
52
+ extensionConfig = filteredByLocation[0];
53
+ }
54
+ }
43
55
  }
44
56
  yield index_1.DevModeInterface.setup({
45
57
  promptUser: inquirer_1.default.createPromptModule(),
@@ -51,7 +63,9 @@ const config_1 = require("./config");
51
63
  },
52
64
  extensionConfig,
53
65
  });
54
- yield index_1.DevModeInterface.start({});
66
+ yield index_1.DevModeInterface.start({
67
+ accountId: account,
68
+ });
55
69
  }
56
70
  else if (BUILD_MODE) {
57
71
  if (extension) {
package/dist/cli/utils.js CHANGED
@@ -21,8 +21,10 @@ function parseArgs() {
21
21
  const optionDefinitions = [
22
22
  { name: 'port', alias: 'p', type: Number },
23
23
  { name: 'extension', alias: 'e', type: String },
24
+ { name: 'location', alias: 'l', type: String },
24
25
  { name: 'help', alias: 'h', type: Boolean },
25
26
  { name: 'force', alias: 'f', type: Boolean },
27
+ { name: 'account', alias: 'a', type: Number },
26
28
  ];
27
29
  const options = (0, command_line_args_1.default)(optionDefinitions, DEV_MODE || BUILD_MODE ? { argv } : {});
28
30
  return Object.assign({ DEV_MODE, BUILD_MODE }, options);
@@ -50,6 +52,18 @@ function showHelp(OUTPUT_DIR) {
50
52
  typeLabel: '{underline file}',
51
53
  description: 'The extension entrypoint file to build or start local development for',
52
54
  },
55
+ {
56
+ name: 'location',
57
+ alias: 'l',
58
+ typeLabel: '{underline string}',
59
+ description: 'The the location of the extension to run, this is only needed if two extensions use the same entrypoint file and do not have uids',
60
+ },
61
+ {
62
+ name: 'account',
63
+ alias: 'a',
64
+ typeLabel: '{underline number}',
65
+ description: 'The accountId you would like to use to run the extension',
66
+ },
53
67
  {
54
68
  name: 'help',
55
69
  alias: 'h',
package/dist/index.js CHANGED
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3
- // @ts-nocheck We aren't ready to type check these files yet
4
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
5
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
6
4
  };
@@ -36,10 +36,10 @@ class DevModeInterface {
36
36
  this.cardConfigs = component.config.extensions.crm.cards.map(card => path_1.default.join(component.path, card.file));
37
37
  // Load all of the extension configs for a particular app.json file
38
38
  const extensionsConfigForApp = (0, config_1.loadExtensionConfig)(component.config, component.path);
39
- const extensionFilePaths = Object.keys(extensionsConfigForApp);
39
+ const extensionConfigKeys = Object.keys(extensionsConfigForApp);
40
40
  // Loop over the loaded extension configs and generate the list of choices to use to prompt the user for input
41
- extensionFilePaths.forEach(extensionPath => {
42
- const extensionConfig = extensionsConfigForApp[extensionPath];
41
+ extensionConfigKeys.forEach(extensionKey => {
42
+ const extensionConfig = extensionsConfigForApp[extensionKey];
43
43
  appExtensionMappings.push({
44
44
  name: `${componentName}/${extensionConfig.data.title}`,
45
45
  value: extensionConfig,
@@ -1,14 +1,14 @@
1
- interface BuildSingleExtenstionArgs {
1
+ interface BuildSingleExtensionArgs {
2
2
  file: string;
3
3
  outputDir?: string;
4
4
  emptyOutDir?: boolean;
5
5
  minify?: boolean;
6
6
  root?: string;
7
7
  }
8
- declare const extensionErrorBaseMessage: string;
9
- declare function buildAllExtensions({ outputDir }: {
8
+ export declare const extensionErrorBaseMessage: string;
9
+ export declare function buildAllExtensions({ outputDir }: {
10
10
  outputDir: string;
11
11
  }): Promise<void>;
12
- declare function buildSingleExtension({ file, outputDir, emptyOutDir, minify, root, }: BuildSingleExtenstionArgs): Promise<void>;
13
- declare function remoteBuild(root: string, entryPoint: string, outputDir?: string): Promise<void>;
14
- export { buildAllExtensions, buildSingleExtension, remoteBuild, extensionErrorBaseMessage, };
12
+ export declare function buildSingleExtension({ file, outputDir, emptyOutDir, minify, root, }: BuildSingleExtensionArgs): Promise<void>;
13
+ export declare function remoteBuild(root: string, entryPoint: string, outputDir?: string): Promise<void>;
14
+ export {};
package/dist/lib/build.js CHANGED
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.extensionErrorBaseMessage = exports.remoteBuild = exports.buildSingleExtension = exports.buildAllExtensions = void 0;
15
+ exports.remoteBuild = exports.buildSingleExtension = exports.buildAllExtensions = exports.extensionErrorBaseMessage = void 0;
16
16
  const vite_1 = require("vite");
17
17
  const constants_1 = require("./constants");
18
18
  const manifestPlugin_1 = __importDefault(require("./plugins/manifestPlugin"));
@@ -21,8 +21,7 @@ const utils_1 = require("./utils");
21
21
  const config_1 = require("../cli/config");
22
22
  const codeInjectionPlugin_1 = __importDefault(require("./plugins/codeInjectionPlugin"));
23
23
  const allowedExtensions = ['.js', '.ts', '.tsx', '.jsx'];
24
- const extensionErrorBaseMessage = `Supported file extensions are [${allowedExtensions.join(', ')}], received:`;
25
- exports.extensionErrorBaseMessage = extensionErrorBaseMessage;
24
+ exports.extensionErrorBaseMessage = `Supported file extensions are [${allowedExtensions.join(', ')}], received:`;
26
25
  function buildAllExtensions({ outputDir }) {
27
26
  return __awaiter(this, void 0, void 0, function* () {
28
27
  const config = (0, config_1.loadConfig)();
@@ -54,7 +53,10 @@ function buildSingleExtension({ file, outputDir = constants_1.OUTPUT_DIR, emptyO
54
53
  formats: ['iife'],
55
54
  fileName: () => output,
56
55
  },
57
- rollupOptions: Object.assign(Object.assign({}, constants_1.ROLLUP_OPTIONS), { plugins: [(0, manifestPlugin_1.default)({ output }), (0, codeInjectionPlugin_1.default)({ file })] }),
56
+ rollupOptions: Object.assign(Object.assign({}, constants_1.ROLLUP_OPTIONS), { plugins: [
57
+ (0, manifestPlugin_1.default)({ output, extensionPath: root }),
58
+ (0, codeInjectionPlugin_1.default)({ file }),
59
+ ] }),
58
60
  outDir: outputDir,
59
61
  emptyOutDir,
60
62
  minify,
@@ -67,7 +69,7 @@ function remoteBuild(root, entryPoint, outputDir = constants_1.OUTPUT_DIR) {
67
69
  return __awaiter(this, void 0, void 0, function* () {
68
70
  const fileInfo = path_1.default.parse(entryPoint);
69
71
  if (!allowedExtensions.includes(fileInfo.ext)) {
70
- throw new Error(`${extensionErrorBaseMessage} ${fileInfo.ext}`);
72
+ throw new Error(`${exports.extensionErrorBaseMessage} ${fileInfo.ext}`);
71
73
  }
72
74
  yield buildSingleExtension({
73
75
  file: entryPoint,
@@ -1,9 +1,9 @@
1
- declare const OUTPUT_DIR = "dist";
2
- declare const MAIN_APP_CONFIG = "app.json";
3
- declare const MANIFEST_FILE = "manifest.json";
4
- declare const VITE_DEFAULT_PORT = 5173;
5
- declare const WEBSOCKET_PORT = 5174;
6
- declare const ROLLUP_OPTIONS: {
1
+ export declare const OUTPUT_DIR = "dist";
2
+ export declare const MAIN_APP_CONFIG = "app.json";
3
+ export declare const MANIFEST_FILE = "manifest.json";
4
+ export declare const VITE_DEFAULT_PORT = 5173;
5
+ export declare const WEBSOCKET_PORT = 5174;
6
+ export declare const ROLLUP_OPTIONS: {
7
7
  external: string[];
8
8
  output: {
9
9
  globals: {
@@ -13,7 +13,6 @@ declare const ROLLUP_OPTIONS: {
13
13
  extend: boolean;
14
14
  };
15
15
  };
16
- declare const EXTENSIONS_MESSAGE_VERSION = 1;
17
- declare const WEBSOCKET_MESSAGE_VERSION = 0;
18
- declare const SERVER_CAPABILITIES: string[];
19
- export { ROLLUP_OPTIONS, OUTPUT_DIR, MAIN_APP_CONFIG, MANIFEST_FILE, EXTENSIONS_MESSAGE_VERSION, VITE_DEFAULT_PORT, WEBSOCKET_MESSAGE_VERSION, WEBSOCKET_PORT, SERVER_CAPABILITIES, };
16
+ export declare const EXTENSIONS_MESSAGE_VERSION = 2;
17
+ export declare const WEBSOCKET_MESSAGE_VERSION = 1;
18
+ export declare const SERVER_CAPABILITIES: string[];
@@ -1,17 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SERVER_CAPABILITIES = exports.WEBSOCKET_PORT = exports.WEBSOCKET_MESSAGE_VERSION = exports.VITE_DEFAULT_PORT = exports.EXTENSIONS_MESSAGE_VERSION = exports.MANIFEST_FILE = exports.MAIN_APP_CONFIG = exports.OUTPUT_DIR = exports.ROLLUP_OPTIONS = void 0;
4
- const OUTPUT_DIR = 'dist';
5
- exports.OUTPUT_DIR = OUTPUT_DIR;
6
- const MAIN_APP_CONFIG = 'app.json';
7
- exports.MAIN_APP_CONFIG = MAIN_APP_CONFIG;
8
- const MANIFEST_FILE = 'manifest.json';
9
- exports.MANIFEST_FILE = MANIFEST_FILE;
10
- const VITE_DEFAULT_PORT = 5173;
11
- exports.VITE_DEFAULT_PORT = VITE_DEFAULT_PORT;
12
- const WEBSOCKET_PORT = 5174;
13
- exports.WEBSOCKET_PORT = WEBSOCKET_PORT;
14
- const ROLLUP_OPTIONS = {
3
+ exports.SERVER_CAPABILITIES = exports.WEBSOCKET_MESSAGE_VERSION = exports.EXTENSIONS_MESSAGE_VERSION = exports.ROLLUP_OPTIONS = exports.WEBSOCKET_PORT = exports.VITE_DEFAULT_PORT = exports.MANIFEST_FILE = exports.MAIN_APP_CONFIG = exports.OUTPUT_DIR = void 0;
4
+ exports.OUTPUT_DIR = 'dist';
5
+ exports.MAIN_APP_CONFIG = 'app.json';
6
+ exports.MANIFEST_FILE = 'manifest.json';
7
+ exports.VITE_DEFAULT_PORT = 5173;
8
+ exports.WEBSOCKET_PORT = 5174;
9
+ exports.ROLLUP_OPTIONS = {
15
10
  // Deps to exclude from the bundle
16
11
  external: ['react', 'react-dom', '@remote-ui/react'],
17
12
  output: {
@@ -23,13 +18,11 @@ const ROLLUP_OPTIONS = {
23
18
  extend: true,
24
19
  },
25
20
  };
26
- exports.ROLLUP_OPTIONS = ROLLUP_OPTIONS;
27
- const EXTENSIONS_MESSAGE_VERSION = 1;
28
- exports.EXTENSIONS_MESSAGE_VERSION = EXTENSIONS_MESSAGE_VERSION;
29
- const WEBSOCKET_MESSAGE_VERSION = 0;
30
- exports.WEBSOCKET_MESSAGE_VERSION = WEBSOCKET_MESSAGE_VERSION;
31
- const SERVER_CAPABILITIES = [
21
+ exports.EXTENSIONS_MESSAGE_VERSION = 2;
22
+ exports.WEBSOCKET_MESSAGE_VERSION = 1;
23
+ exports.SERVER_CAPABILITIES = [
32
24
  // Supports running app functions locally
33
25
  'app-functions-local-dev',
26
+ 'source-id',
27
+ 'account-id',
34
28
  ];
35
- exports.SERVER_CAPABILITIES = SERVER_CAPABILITIES;
package/dist/lib/dev.d.ts CHANGED
@@ -9,5 +9,5 @@ interface StartDevModeArgs {
9
9
  functionsConfig: Partial<ServiceConfiguration>;
10
10
  cardConfigs: string[];
11
11
  }
12
- declare function startDevMode({ extensionConfig, functionsConfig, outputDir, expressPort, webSocketPort, root, cardConfigs, }: StartDevModeArgs): Promise<() => Promise<void>>;
13
- export { startDevMode };
12
+ export declare function startDevMode({ extensionConfig, functionsConfig, outputDir, expressPort, webSocketPort, root, cardConfigs, }: StartDevModeArgs): Promise<() => Promise<void>>;
13
+ export {};
package/dist/lib/dev.js CHANGED
@@ -82,10 +82,13 @@ function startDevMode({ extensionConfig, functionsConfig, outputDir = constants_
82
82
  if (actualWebSocketPort !== webSocketPort) {
83
83
  logger_1.logger.debug(`WebSocket port ${webSocketPort} is in use; using next available port ${actualWebSocketPort}`);
84
84
  }
85
+ const { appName, title, sourceId } = extensionConfig.data;
85
86
  const baseMessage = Object.freeze({
86
- appName: extensionConfig.data.appName,
87
- title: extensionConfig.data.title,
87
+ appName,
88
+ title,
89
+ sourceId,
88
90
  callback: `http://hslocal.net:${expressPort}/${extensionConfig.output}`,
91
+ portalId: functionsConfig.accountId,
89
92
  });
90
93
  const viteDevServer = yield _createViteDevServer({
91
94
  outputDir,
@@ -22,6 +22,7 @@ class ExtensionsService {
22
22
  websocket: `ws://localhost:${webSocketPort}`,
23
23
  version: constants_1.EXTENSIONS_MESSAGE_VERSION,
24
24
  capabilities,
25
+ portalId: baseMessage.portalId,
25
26
  extensions: [
26
27
  Object.assign(Object.assign({}, baseMessage), { manifest: (0, utils_1.loadManifest)(outputDir, output) }),
27
28
  ],
@@ -66,6 +66,7 @@ const devBuildPlugin = options => {
66
66
  (0, manifestPlugin_1.default)({
67
67
  minify: false,
68
68
  output: extensionConfig.output,
69
+ extensionPath: extensionConfig.extensionPath,
69
70
  }),
70
71
  (0, codeCheckingPlugin_1.default)({
71
72
  output: path_1.default.join(outputDir, extensionConfig.output),
@@ -2,6 +2,7 @@ import { Rollup } from 'vite';
2
2
  export interface ManifestPluginOptions {
3
3
  output: string;
4
4
  minify?: boolean;
5
+ extensionPath?: string;
5
6
  }
6
7
  export type ManifestPlugin = (options: ManifestPluginOptions) => Rollup.Plugin;
7
8
  declare const manifestPlugin: ManifestPlugin;
@@ -17,10 +17,10 @@ const manifestPlugin = options => {
17
17
  name: 'ui-extensions-manifest-generation-plugin',
18
18
  enforce: 'post',
19
19
  generateBundle(_rollupOptions, bundle) {
20
- const { output, minify = false } = options;
20
+ const { output, minify = false, extensionPath = process.cwd() } = options;
21
21
  try {
22
22
  const filename = path_2.default.parse(output).name;
23
- const manifest = _generateManifestContents(bundle);
23
+ const manifest = _generateManifestContents(bundle, extensionPath);
24
24
  this.emitFile({
25
25
  type: 'asset',
26
26
  source: minify
@@ -35,9 +35,9 @@ const manifestPlugin = options => {
35
35
  },
36
36
  };
37
37
  };
38
- function _generateManifestContents(bundle) {
38
+ function _generateManifestContents(bundle, extensionPath) {
39
39
  const baseManifest = {
40
- package: _loadPackageFile(),
40
+ package: _loadPackageFile(extensionPath),
41
41
  };
42
42
  // The keys to bundle are the filename without any path information
43
43
  const bundles = Object.keys(bundle).filter(cur => cur.endsWith('.js'));
@@ -56,17 +56,18 @@ function _generateManifestEntry(subBundle) {
56
56
  modules: _buildModulesInfo(moduleIds, modules),
57
57
  };
58
58
  }
59
- function _loadJsonFileSafely(filename) {
59
+ function _loadJsonFileSafely(extensionPath, filename) {
60
60
  try {
61
- return JSON.parse((0, fs_1.readFileSync)(filename).toString());
61
+ return JSON.parse((0, fs_1.readFileSync)(path_2.default.join(extensionPath, filename)).toString());
62
62
  }
63
63
  catch (e) {
64
64
  return undefined;
65
65
  }
66
66
  }
67
- function _loadPackageFile() {
67
+ function _loadPackageFile(extensionPath) {
68
68
  // Look for package-lock.json then fallback to package.json
69
- return (_loadJsonFileSafely(PACKAGE_LOCK_FILE) || _loadJsonFileSafely(PACKAGE_FILE));
69
+ return (_loadJsonFileSafely(extensionPath, PACKAGE_LOCK_FILE) ||
70
+ _loadJsonFileSafely(extensionPath, PACKAGE_FILE));
70
71
  }
71
72
  function _stripPathPriorToExtDir(filepath) {
72
73
  return filepath === null || filepath === void 0 ? void 0 : filepath.split(EXTENSIONS_PATH).pop();
@@ -14,7 +14,9 @@ export interface ExtensionConfig {
14
14
  file: string;
15
15
  };
16
16
  objectTypes: ObjectTypes[];
17
+ sourceId?: string | null;
17
18
  };
19
+ uid?: string;
18
20
  }
19
21
  export interface ExtensionConfigMap {
20
22
  [key: string]: ExtensionConfig;
@@ -32,6 +34,7 @@ export interface AppConfig {
32
34
  cards: CardConfig[];
33
35
  };
34
36
  };
37
+ uid?: string;
35
38
  }
36
39
  export interface ProjectComponent {
37
40
  config: AppConfig;
@@ -44,5 +47,7 @@ export interface BaseMessage {
44
47
  appName: string;
45
48
  title: string;
46
49
  callback: string;
50
+ sourceId?: string | null;
51
+ portalId?: number;
47
52
  }
48
53
  export {};
@@ -1,4 +1,5 @@
1
- declare function getUrlSafeFileName(filePath: string): string;
2
- declare function stripAnsiColorCodes(stringWithColorCodes: string | undefined): string | null;
3
- declare function loadManifest(outputDir: string, output: string): any;
4
- export { getUrlSafeFileName, stripAnsiColorCodes, loadManifest };
1
+ import { AppConfig, ExtensionConfig } from './types';
2
+ export declare function getUrlSafeFileName(filePath: string): string;
3
+ export declare function stripAnsiColorCodes(stringWithColorCodes: string | undefined | null): string | null;
4
+ export declare function loadManifest(outputDir: string, output: string): any;
5
+ export declare function buildSourceId(appConfig: AppConfig, extensionConfig: ExtensionConfig): string | null;
package/dist/lib/utils.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.loadManifest = exports.stripAnsiColorCodes = exports.getUrlSafeFileName = void 0;
6
+ exports.buildSourceId = exports.loadManifest = exports.stripAnsiColorCodes = exports.getUrlSafeFileName = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const constants_1 = require("./constants");
@@ -33,3 +33,10 @@ function loadManifest(outputDir, output) {
33
33
  }
34
34
  }
35
35
  exports.loadManifest = loadManifest;
36
+ function buildSourceId(appConfig, extensionConfig) {
37
+ if (appConfig.uid && extensionConfig.uid) {
38
+ return `${appConfig.uid}::${extensionConfig.uid}`;
39
+ }
40
+ return null;
41
+ }
42
+ exports.buildSourceId = buildSourceId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions-dev-server",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -66,5 +66,5 @@
66
66
  "optional": true
67
67
  }
68
68
  },
69
- "gitHead": "80535f127c717f76d07fca05c9f676ec29ad5d18"
69
+ "gitHead": "5fd5fe43bc0b09750653dd7121d56bf0d60788bb"
70
70
  }