@hubspot/project-parsing-lib 0.2.2-beta.0 → 0.3.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/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/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?: {
|