@hubspot/project-parsing-lib 0.2.2 → 0.3.1-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 +1 -1
- package/src/index.d.ts +2 -2
- package/src/index.js +2 -0
- package/src/lib/constants.d.ts +1 -1
- package/src/lib/constants.js +5 -5
- package/src/lib/types.d.ts +4 -0
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IntermediateRepresentation, IntermediateRepresentationNode, IntermediateRepresentationLocalDev, TranslationContext, TranslationOptions, IntermediateRepresentationNodeLocalDev } from './lib/types';
|
|
1
|
+
import { IntermediateRepresentation, IntermediateRepresentationNode, IntermediateRepresentationLocalDev, TranslationContext, TranslationOptions, IntermediateRepresentationNodeLocalDev, TranslationOptionsLocalDev } from './lib/types';
|
|
2
2
|
import { ValidateFunction, AnySchema, ErrorObject } from 'ajv/dist/2020';
|
|
3
3
|
export declare function translate(translationContext: TranslationContext, translationOptions?: TranslationOptions): Promise<IntermediateRepresentation>;
|
|
4
|
-
export declare function translateForLocalDev(translationContext: TranslationContext, translationOptions?:
|
|
4
|
+
export declare function translateForLocalDev(translationContext: TranslationContext, translationOptions?: TranslationOptionsLocalDev): Promise<IntermediateRepresentationLocalDev>;
|
|
5
5
|
export { isTranslationError } from './lib/errors';
|
|
6
6
|
export { IntermediateRepresentation, IntermediateRepresentationNode, IntermediateRepresentationLocalDev, IntermediateRepresentationNodeLocalDev, TranslationContext, };
|
|
7
7
|
export { getHsProfileFilename } from './lib/profiles';
|
package/src/index.js
CHANGED
|
@@ -43,11 +43,13 @@ async function translateForLocalDev(translationContext, translationOptions) {
|
|
|
43
43
|
Object.entries(IR.intermediateNodesIndexedByUid).forEach(([uid, node]) => {
|
|
44
44
|
const component = IR.intermediateNodesIndexedByUid[uid];
|
|
45
45
|
const componentConfigPath = path_1.default.join(translationContext.projectSourceDir, component.metaFilePath);
|
|
46
|
+
const configUpdatedSinceLastUpload = Boolean(translationOptions?.configFilesUpdatedSinceLastUpload?.has(componentConfigPath));
|
|
46
47
|
localDevIr.intermediateNodesIndexedByUid[uid] = {
|
|
47
48
|
...node,
|
|
48
49
|
localDev: {
|
|
49
50
|
componentRoot: path_1.default.dirname(componentConfigPath),
|
|
50
51
|
componentConfigPath,
|
|
52
|
+
configUpdatedSinceLastUpload,
|
|
51
53
|
},
|
|
52
54
|
};
|
|
53
55
|
});
|
package/src/lib/constants.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const SCIMKey = "scim";
|
|
|
9
9
|
export declare const SettingsKey = "settings";
|
|
10
10
|
export declare const MarketingEventsKey = "marketing-event";
|
|
11
11
|
export declare const MediaBridgeKey = "media-bridge";
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const AppEventsKey = "app-event";
|
|
13
13
|
export declare const VideoConferencingKey = "video-conferencing";
|
|
14
14
|
export declare const WebhooksKey = "webhooks";
|
|
15
15
|
export declare const WorkflowActionsKey = "workflow-action";
|
package/src/lib/constants.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.allowedSubComponentDirectories = exports.allowedComponentDirectories = exports.ProjectStructure = 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.
|
|
36
|
+
exports.allowedSubComponentDirectories = exports.allowedComponentDirectories = exports.ProjectStructure = 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.AppEventsKey = exports.MediaBridgeKey = exports.MarketingEventsKey = exports.SettingsKey = exports.SCIMKey = exports.CardsKey = exports.CallingKey = exports.AppObjectAssociationKey = exports.AppObjectKey = exports.AppFunctionsKey = exports.ThemeKey = exports.AppKey = void 0;
|
|
37
37
|
// Top Level Component types
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
39
|
// Component types
|
|
@@ -49,7 +49,7 @@ exports.SCIMKey = 'scim';
|
|
|
49
49
|
exports.SettingsKey = 'settings';
|
|
50
50
|
exports.MarketingEventsKey = 'marketing-event';
|
|
51
51
|
exports.MediaBridgeKey = 'media-bridge';
|
|
52
|
-
exports.
|
|
52
|
+
exports.AppEventsKey = 'app-event';
|
|
53
53
|
exports.VideoConferencingKey = 'video-conferencing';
|
|
54
54
|
exports.WebhooksKey = 'webhooks';
|
|
55
55
|
exports.WorkflowActionsKey = 'workflow-action';
|
|
@@ -135,10 +135,10 @@ exports.Components = {
|
|
|
135
135
|
userFriendlyName: 'Media Bridge',
|
|
136
136
|
...SubComponentFields,
|
|
137
137
|
},
|
|
138
|
-
[exports.
|
|
139
|
-
dir: '
|
|
138
|
+
[exports.AppEventsKey]: {
|
|
139
|
+
dir: 'app-events',
|
|
140
140
|
parentComponent: exports.AppKey,
|
|
141
|
-
userFriendlyName: '
|
|
141
|
+
userFriendlyName: 'App Event',
|
|
142
142
|
...SubComponentFields,
|
|
143
143
|
},
|
|
144
144
|
[exports.VideoConferencingKey]: {
|
package/src/lib/types.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export interface IntermediateRepresentationNodeLocalDev extends IntermediateRepr
|
|
|
34
34
|
localDev: {
|
|
35
35
|
componentRoot: string;
|
|
36
36
|
componentConfigPath: string;
|
|
37
|
+
configUpdatedSinceLastUpload: boolean;
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
export interface IntermediateRepresentationLocalDev {
|
|
@@ -58,6 +59,9 @@ export interface TranslationOptions {
|
|
|
58
59
|
skipValidation?: boolean;
|
|
59
60
|
profile?: string;
|
|
60
61
|
}
|
|
62
|
+
export interface TranslationOptionsLocalDev extends TranslationOptions {
|
|
63
|
+
configFilesUpdatedSinceLastUpload?: Set<string>;
|
|
64
|
+
}
|
|
61
65
|
export interface HsProfileFile {
|
|
62
66
|
accountId: number;
|
|
63
67
|
variables?: {
|