@hubspot/ui-extensions-dev-server 0.8.43 → 0.8.45

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/dist/lib/ast.js CHANGED
@@ -88,7 +88,7 @@ function _collectDataDependencies(node, output, logger) {
88
88
  if (node.type === 'CallExpression' &&
89
89
  node.callee.type === 'Identifier' &&
90
90
  node.callee.name === 'useCrmProperties') {
91
- const propertyType = 'CrmRecordDataProperties';
91
+ const propertyType = 'CrmRecordProperties';
92
92
  // Get the second argument, the properties array.
93
93
  const propertiesNode = node.arguments[1];
94
94
  const requestedProperties = [];
@@ -112,7 +112,7 @@ function _collectDataDependencies(node, output, logger) {
112
112
  * This refID is a hash of the property type and the requested properties.
113
113
  * This should allow us to create the same hash at execution time, to find the correct data from BE.
114
114
  */
115
- refId: (0, utils_1.generateHash)(propertyType, requestedProperties),
115
+ referenceId: (0, utils_1.generateHash)(propertyType, requestedProperties),
116
116
  properties: {
117
117
  type: propertyType,
118
118
  recordProperties: requestedProperties,
@@ -116,7 +116,7 @@ export interface FunctionMetadata {
116
116
  invoked?: boolean;
117
117
  }
118
118
  export type DataDependency = {
119
- refId: string;
119
+ referenceId: string;
120
120
  properties: {
121
121
  type: string;
122
122
  recordProperties: string[];
package/dist/lib/utils.js CHANGED
@@ -56,10 +56,17 @@ function isExtensionFile(filepath, extensionPath) {
56
56
  if (!filepath) {
57
57
  return false;
58
58
  }
59
- const absoluteFilePath = path_1.default.resolve(filepath).toLowerCase();
60
- const absoluteExtensionDirPath = path_1.default.resolve(extensionPath).toLowerCase();
61
- const relativePath = path_1.default.relative(absoluteExtensionDirPath, absoluteFilePath);
62
- return !relativePath.startsWith('..');
59
+ try {
60
+ const absoluteFilePath = fs_1.default.realpathSync(filepath);
61
+ const absoluteExtensionDirPath = fs_1.default.realpathSync(extensionPath);
62
+ const relativePath = path_1.default.relative(absoluteExtensionDirPath, absoluteFilePath);
63
+ return !relativePath.startsWith('..') && !path_1.default.isAbsolute(relativePath);
64
+ }
65
+ catch (e) {
66
+ console.log(`Error checking if ${filepath} is in extension path: ${e}`);
67
+ // If there's an error, we can't determine if the file is in the extension path, so return false.
68
+ return false;
69
+ }
63
70
  }
64
71
  exports.isExtensionFile = isExtensionFile;
65
72
  class UnhandledPlatformVersionError extends Error {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions-dev-server",
3
- "version": "0.8.43",
3
+ "version": "0.8.45",
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": "a140eea0a991c41c86030a5017b54bfd6151ab4c"
72
+ "gitHead": "27a34c0d8b88f6f9421b2c468a86cdd525ed126a"
73
73
  }