@hubspot/ui-extensions-dev-server 0.3.0 → 0.3.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.
- package/lib/config.js +3 -14
- package/package.json +2 -2
package/lib/config.js
CHANGED
|
@@ -30,15 +30,7 @@ function loadConfig() {
|
|
|
30
30
|
const outputConfig = {};
|
|
31
31
|
|
|
32
32
|
crmCardsSubConfigFiles.forEach(card => {
|
|
33
|
-
const
|
|
34
|
-
if (parsedFile.dir.startsWith('./extensions')) {
|
|
35
|
-
parsedFile.dir = parsedFile.dir.replace('./extensions', './'); // go up one level
|
|
36
|
-
}
|
|
37
|
-
// Get the path to the config file relative to the extensions directory
|
|
38
|
-
const configPathRelativeToExtensions = parsedFile.dir;
|
|
39
|
-
const extensionsPrefixRemoved = path.format(parsedFile);
|
|
40
|
-
const cardConfigPath = path.join(process.cwd(), extensionsPrefixRemoved);
|
|
41
|
-
|
|
33
|
+
const cardConfigPath = path.join(process.cwd(), '..', card.file);
|
|
42
34
|
try {
|
|
43
35
|
const cardConfig = require(cardConfigPath);
|
|
44
36
|
if (!cardConfig.data) {
|
|
@@ -53,11 +45,8 @@ function loadConfig() {
|
|
|
53
45
|
);
|
|
54
46
|
}
|
|
55
47
|
|
|
56
|
-
//
|
|
57
|
-
const entryPointPath = path.join(
|
|
58
|
-
configPathRelativeToExtensions,
|
|
59
|
-
cardConfig.data.module.file
|
|
60
|
-
);
|
|
48
|
+
// Path.join with a single argument will strip off any relative prefixing such as './'
|
|
49
|
+
const entryPointPath = path.join(cardConfig.data.module.file);
|
|
61
50
|
|
|
62
51
|
cardConfig.data.module.file = entryPointPath;
|
|
63
52
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/ui-extensions-dev-server",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"optional": true
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "3da4a07183d48528ef431d46a8d327c053c4fe94"
|
|
65
65
|
}
|