@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 +2 -2
- package/dist/lib/types.d.ts +1 -1
- package/dist/lib/utils.js +11 -4
- package/package.json +2 -2
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 = '
|
|
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
|
-
|
|
115
|
+
referenceId: (0, utils_1.generateHash)(propertyType, requestedProperties),
|
|
116
116
|
properties: {
|
|
117
117
|
type: propertyType,
|
|
118
118
|
recordProperties: requestedProperties,
|
package/dist/lib/types.d.ts
CHANGED
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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.
|
|
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": "
|
|
72
|
+
"gitHead": "27a34c0d8b88f6f9421b2c468a86cdd525ed126a"
|
|
73
73
|
}
|