@hubspot/project-parsing-lib 0.8.4 → 0.8.5-beta.0
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/package.json
CHANGED
package/src/lib/constants.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const AppKey = "app";
|
|
2
2
|
export declare const ThemeKey = "theme";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const CmsAssetsKey = "cms-assets";
|
|
4
4
|
export declare const AppEventsKey = "app-event";
|
|
5
5
|
export declare const AppFunctionsKey = "app-function";
|
|
6
6
|
export declare const PagesKey = "page";
|
|
@@ -38,11 +38,11 @@ export declare const packageJson = "package.json";
|
|
|
38
38
|
export declare const packageLockJson = "package-lock.json";
|
|
39
39
|
export declare const allowedAppSubComponentsDirs: string[];
|
|
40
40
|
export declare const allowedThemeSubComponentsDirs: string[];
|
|
41
|
-
export declare const
|
|
41
|
+
export declare const allowedCmsAssetSubComponentDirs: string[];
|
|
42
42
|
export declare const ProjectStructure: {
|
|
43
43
|
readonly app: string[];
|
|
44
44
|
readonly theme: string[];
|
|
45
|
-
readonly "
|
|
45
|
+
readonly "cms-assets": string[];
|
|
46
46
|
};
|
|
47
47
|
export declare const allowedComponentDirectories: string[];
|
|
48
48
|
export declare const allowedSubComponentDirectories: string[];
|
package/src/lib/constants.js
CHANGED
|
@@ -33,13 +33,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ProfileVariableTypes = exports.allowedSubComponentDirectories = exports.allowedComponentDirectories = exports.ProjectStructure = exports.
|
|
36
|
+
exports.ProfileVariableTypes = exports.allowedSubComponentDirectories = exports.allowedComponentDirectories = exports.ProjectStructure = exports.allowedCmsAssetSubComponentDirs = exports.allowedThemeSubComponentsDirs = exports.allowedAppSubComponentsDirs = exports.packageLockJson = exports.packageJson = exports.hsProjectJsonFilename = exports.profileFilePrefix = exports.metafileExtension = exports.internalTypeToUserFacing = exports.userFacingToInternalType = exports.Components = exports.AutoGeneratedComponentTypes = exports.AppFunctionsPackageKey = exports.WorkflowActionsKey = exports.WebhooksKey = exports.VideoConferencingKey = exports.TelemetryKey = exports.SettingsKey = exports.MediaBridgeKey = exports.MCPRegistryKey = exports.MarketingEventsKey = exports.SCIMKey = exports.CardsKey = exports.CallingKey = exports.AppObjectAssociationKey = exports.AppObjectKey = exports.PagesKey = exports.AppFunctionsKey = exports.AppEventsKey = exports.CmsAssetsKey = exports.ThemeKey = exports.AppKey = void 0;
|
|
37
37
|
// Top Level Component types
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
39
|
// Component types
|
|
40
40
|
exports.AppKey = 'app';
|
|
41
41
|
exports.ThemeKey = 'theme';
|
|
42
|
-
exports.
|
|
42
|
+
exports.CmsAssetsKey = 'cms-assets';
|
|
43
43
|
// Sub-Component types
|
|
44
44
|
exports.AppEventsKey = 'app-event';
|
|
45
45
|
exports.AppFunctionsKey = 'app-function';
|
|
@@ -101,9 +101,9 @@ exports.Components = {
|
|
|
101
101
|
userFriendlyName: 'Theme',
|
|
102
102
|
...TopLevelComponentFields,
|
|
103
103
|
},
|
|
104
|
-
[exports.
|
|
105
|
-
dir: exports.
|
|
106
|
-
userFriendlyName: '
|
|
104
|
+
[exports.CmsAssetsKey]: {
|
|
105
|
+
dir: exports.CmsAssetsKey,
|
|
106
|
+
userFriendlyName: 'CMS Asset',
|
|
107
107
|
...TopLevelComponentFields,
|
|
108
108
|
},
|
|
109
109
|
[exports.CallingKey]: {
|
|
@@ -195,6 +195,7 @@ exports.userFacingToInternalType = {
|
|
|
195
195
|
[exports.AppKey]: 'APPLICATION',
|
|
196
196
|
[exports.SCIMKey]: 'SCIM_INTEGRATION',
|
|
197
197
|
[exports.TelemetryKey]: 'TELEMETRY_CONFIG',
|
|
198
|
+
[exports.CmsAssetsKey]: 'REACT_THEME',
|
|
198
199
|
};
|
|
199
200
|
exports.internalTypeToUserFacing = Object.fromEntries(Object.entries(exports.userFacingToInternalType).map(([key, value]) => [value, key]));
|
|
200
201
|
exports.metafileExtension = '-hsmeta.json';
|
|
@@ -212,11 +213,11 @@ function getSubComponentDirsForParentType(parentComponent) {
|
|
|
212
213
|
}
|
|
213
214
|
exports.allowedAppSubComponentsDirs = getSubComponentDirsForParentType(exports.AppKey);
|
|
214
215
|
exports.allowedThemeSubComponentsDirs = getSubComponentDirsForParentType(exports.ThemeKey);
|
|
215
|
-
exports.
|
|
216
|
+
exports.allowedCmsAssetSubComponentDirs = getSubComponentDirsForParentType(exports.CmsAssetsKey);
|
|
216
217
|
exports.ProjectStructure = {
|
|
217
218
|
[exports.AppKey]: exports.allowedAppSubComponentsDirs,
|
|
218
219
|
[exports.ThemeKey]: exports.allowedThemeSubComponentsDirs,
|
|
219
|
-
[exports.
|
|
220
|
+
[exports.CmsAssetsKey]: exports.allowedCmsAssetSubComponentDirs,
|
|
220
221
|
};
|
|
221
222
|
exports.allowedComponentDirectories = Object.keys(exports.ProjectStructure);
|
|
222
223
|
exports.allowedSubComponentDirectories = Object.entries(exports.ProjectStructure)
|
package/src/lib/migrateThemes.js
CHANGED
|
@@ -88,7 +88,7 @@ async function migrateThemes(projectDir, projectSourceDir) {
|
|
|
88
88
|
legacyReactThemeDetails.forEach(themeDetails => {
|
|
89
89
|
isRootReactThemeProject = themeDetails.themePath === projectSourceDir;
|
|
90
90
|
if (!isRootReactThemeProject) {
|
|
91
|
-
buildNewTheme(constants_1.
|
|
91
|
+
buildNewTheme(constants_1.CmsAssetsKey, migratedProjectTempDir, themeDetails);
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
// Do not support migrating themes that live at the root of the project src directory
|