@hubspot/project-parsing-lib 0.13.0-beta.1 → 0.13.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/project-parsing-lib",
3
- "version": "0.13.0-beta.1",
3
+ "version": "0.13.0",
4
4
  "description": "Parsing library for converting projects directory structures to their intermediate representation",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -2,11 +2,11 @@ import path from 'path';
2
2
  import fs from 'fs';
3
3
  import { logger } from '@hubspot/local-dev-lib/logger';
4
4
  import { applyHsProfileVariables, getHsProfileVariables } from './profiles.js';
5
- import { APP_KEY, APP_OBJECT_KEY, CARDS_KEY, Components, PROJECT_STRUCTURE, APP_FUNCTIONS_KEY, APP_FUNCTIONS_PACKAGE_KEY, USER_FACING_TO_INTERNAL_TYPE, INTERNAL_TYPE_TO_USER_FACING, PACKAGE_JSON, PACKAGE_LOCK_JSON, PROFILE_VARIABLE_TYPES, } from './constants.js';
5
+ import { APP_KEY, APP_OBJECT_KEY, Components, PROJECT_STRUCTURE, APP_FUNCTIONS_KEY, APP_FUNCTIONS_PACKAGE_KEY, USER_FACING_TO_INTERNAL_TYPE, INTERNAL_TYPE_TO_USER_FACING, PACKAGE_JSON, PACKAGE_LOCK_JSON, PROFILE_VARIABLE_TYPES, } from './constants.js';
6
6
  import { errorMessages } from '../lang/copy.js';
7
7
  import { getJavaNumberType } from './utils.js';
8
8
  import { convertPathToPosixPath } from './files.js';
9
- function calculateComponentDeps(fileValidationResult, parentComponents, appObjects, appFunctions, appFunctionsPackageUid) {
9
+ function calculateComponentDeps(fileValidationResult, parentComponents, appObjects, appFunctionsPackageUid) {
10
10
  let dependencies = {};
11
11
  // If there are dependencies in the config file, pass them through
12
12
  if (!fileValidationResult.content?.dependencies) {
@@ -32,14 +32,6 @@ function calculateComponentDeps(fileValidationResult, parentComponents, appObjec
32
32
  if (type === APP_FUNCTIONS_KEY && appFunctionsPackageUid) {
33
33
  dependencies.serverlessPackage = appFunctionsPackageUid;
34
34
  }
35
- if (type === CARDS_KEY) {
36
- if (appFunctionsPackageUid) {
37
- dependencies.serverlessPackage = appFunctionsPackageUid;
38
- }
39
- if (appFunctions.length > 0) {
40
- dependencies.allAppFunctions = appFunctions;
41
- }
42
- }
43
35
  }
44
36
  return { dependencies };
45
37
  }
@@ -62,7 +54,6 @@ export function transform(fileParseResults, translationContext, hsProfileContent
62
54
  const parentTypes = Object.keys(PROJECT_STRUCTURE);
63
55
  const parentComponents = {};
64
56
  const allAppObjects = [];
65
- const allAppFunctions = [];
66
57
  let appUid = '';
67
58
  let appFunctionsDirectory;
68
59
  // Apply the profile variable overrides to the config
@@ -82,7 +73,6 @@ export function transform(fileParseResults, translationContext, hsProfileContent
82
73
  }
83
74
  if (file.content?.type === APP_FUNCTIONS_KEY) {
84
75
  appFunctionsDirectory = path.dirname(file.file);
85
- allAppFunctions.push(file.content.uid);
86
76
  }
87
77
  });
88
78
  const autoGeneratedComponents = [];
@@ -106,7 +96,7 @@ export function transform(fileParseResults, translationContext, hsProfileContent
106
96
  };
107
97
  }
108
98
  const { config, uid, type } = currentFile.content;
109
- const { dependencies, errors } = calculateComponentDeps(currentFile, parentComponents, allAppObjects, allAppFunctions, serverlessPackageUid);
99
+ const { dependencies, errors } = calculateComponentDeps(currentFile, parentComponents, allAppObjects, serverlessPackageUid);
110
100
  if (errors) {
111
101
  currentFile.errors?.push(...errors);
112
102
  }