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

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.
Files changed (2) hide show
  1. package/dist/lib/utils.js +11 -4
  2. package/package.json +2 -2
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.44",
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": "f972e9fd74c22943004f2066086ca9178657d2ef"
73
73
  }