@hubspot/cli 7.11.7-experimental.0 → 7.11.8-experimental.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/bin/hs.d.ts +2 -0
- package/bin/hscms.d.ts +2 -0
- package/commands/project/__tests__/devUnifiedFlow.test.js +2 -2
- package/commands/project/create.js +1 -1
- package/commands/project/dev/unifiedFlow.d.ts +1 -1
- package/commands/project/dev/unifiedFlow.js +2 -1
- package/commands/project/profile/add.js +1 -1
- package/commands/project/profile/delete.js +1 -1
- package/lang/en.d.ts +1 -0
- package/lang/en.js +2 -1
- package/lib/__tests__/projectProfiles.test.js +2 -2
- package/lib/app/__tests__/migrate.test.js +2 -2
- package/lib/app/migrate.js +2 -2
- package/lib/middleware/autoUpdateMiddleware.js +1 -1
- package/lib/middleware/configMiddleware.js +4 -2
- package/lib/middleware/gitMiddleware.js +4 -2
- package/lib/projectProfiles.d.ts +1 -1
- package/lib/projectProfiles.js +1 -1
- package/lib/projects/__tests__/DevServerManager.test.js +0 -1
- package/lib/projects/__tests__/LocalDevProcess.test.js +2 -2
- package/lib/projects/__tests__/components.test.js +20 -5
- package/lib/projects/__tests__/localDevProjectHelpers.test.js +4 -3
- package/lib/projects/add/__tests__/v2AddComponent.test.js +2 -2
- package/lib/projects/add/v2AddComponent.js +2 -2
- package/lib/projects/components.d.ts +1 -1
- package/lib/projects/components.js +2 -2
- package/lib/projects/create/v2.d.ts +1 -1
- package/lib/projects/create/v2.js +1 -1
- package/lib/projects/localDev/LocalDevProcess.d.ts +1 -1
- package/lib/projects/localDev/LocalDevProcess.js +1 -1
- package/lib/projects/localDev/LocalDevState.d.ts +1 -2
- package/lib/projects/localDev/helpers/project.d.ts +1 -1
- package/lib/projects/localDev/helpers/project.js +1 -1
- package/lib/projects/pollProjectBuildAndDeploy.js +2 -2
- package/lib/projects/structure.d.ts +1 -1
- package/lib/projects/upload.js +7 -3
- package/lib/theme/__tests__/migrate.test.js +2 -2
- package/lib/theme/migrate.js +1 -1
- package/mcp-server/tools/project/GetConfigValuesTool.js +1 -2
- package/mcp-server/tools/project/UploadProjectTools.js +1 -1
- package/mcp-server/tools/project/__tests__/GetConfigValuesTool.test.js +2 -4
- package/mcp-server/tools/project/__tests__/UploadProjectTools.test.js +2 -2
- package/package.json +8 -7
- package/types/LocalDev.d.ts +1 -2
- package/types/ProjectComponents.d.ts +1 -1
- package/ui/components/BoxWithTitle.js +1 -1
- /package/bin/{hs → hs.js} +0 -0
- /package/bin/{hscms → hscms.js} +0 -0
package/bin/hs.d.ts
ADDED
package/bin/hscms.d.ts
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import { HUBSPOT_ACCOUNT_TYPES } from '@hubspot/local-dev-lib/constants/config';
|
|
3
|
-
import { translateForLocalDev } from '@hubspot/project-parsing-lib
|
|
3
|
+
import { translateForLocalDev } from '@hubspot/project-parsing-lib';
|
|
4
4
|
import { getAllConfigAccounts, getConfigAccountById, getConfigAccountEnvironment, } from '@hubspot/local-dev-lib/config';
|
|
5
5
|
import { getValidEnv } from '@hubspot/local-dev-lib/environment';
|
|
6
6
|
import { getServerPortByInstanceId } from '@hubspot/local-dev-lib/portManager';
|
|
@@ -31,7 +31,7 @@ vi.mock('@hubspot/ui-extensions-dev-server', () => ({
|
|
|
31
31
|
},
|
|
32
32
|
}));
|
|
33
33
|
// Mock all dependencies
|
|
34
|
-
vi.mock('@hubspot/project-parsing-lib
|
|
34
|
+
vi.mock('@hubspot/project-parsing-lib');
|
|
35
35
|
vi.mock('@hubspot/local-dev-lib/config');
|
|
36
36
|
vi.mock('@hubspot/local-dev-lib/environment');
|
|
37
37
|
vi.mock('@hubspot/local-dev-lib/portManager');
|
|
@@ -15,7 +15,7 @@ import { PLATFORM_VERSIONS } from '@hubspot/local-dev-lib/constants/projects';
|
|
|
15
15
|
import { commands } from '../../lang/en.js';
|
|
16
16
|
import { uiLogger } from '../../lib/ui/logger.js';
|
|
17
17
|
import { handleProjectCreationFlow, } from '../../lib/projects/create/index.js';
|
|
18
|
-
import { getProjectMetadata, } from '@hubspot/project-parsing-lib/
|
|
18
|
+
import { getProjectMetadata, } from '@hubspot/project-parsing-lib/src/lib/project.js';
|
|
19
19
|
import { updateHsMetaFilesWithAutoGeneratedFields } from '../../lib/projects/components.js';
|
|
20
20
|
import SpinniesManager from '../../lib/ui/SpinniesManager.js';
|
|
21
21
|
const command = ['create', 'init'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArgumentsCamelCase } from 'yargs';
|
|
2
|
-
import
|
|
2
|
+
import { HsProfileFile } from '@hubspot/project-parsing-lib/src/lib/types.js';
|
|
3
3
|
import { ProjectDevArgs } from '../../../types/Yargs.js';
|
|
4
4
|
import { ProjectConfig } from '../../../types/Projects.js';
|
|
5
5
|
type UnifiedProjectDevFlowArgs = {
|
|
@@ -2,7 +2,8 @@ import path from 'path';
|
|
|
2
2
|
import util from 'util';
|
|
3
3
|
import { HUBSPOT_ACCOUNT_TYPES } from '@hubspot/local-dev-lib/constants/config';
|
|
4
4
|
import { startPortManagerServer, stopPortManagerServer, } from '@hubspot/local-dev-lib/portManager';
|
|
5
|
-
import { isTranslationError
|
|
5
|
+
import { isTranslationError } from '@hubspot/project-parsing-lib/src/lib/errors.js';
|
|
6
|
+
import { translateForLocalDev } from '@hubspot/project-parsing-lib';
|
|
6
7
|
import { getConfigAccountEnvironment, getAllConfigAccounts, getConfigAccountById, } from '@hubspot/local-dev-lib/config';
|
|
7
8
|
import { logError } from '../../../lib/errorHandlers/index.js';
|
|
8
9
|
import { EXIT_CODES } from '../../../lib/enums/exitCodes.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import { getConfigAccountIfExists, getAllConfigAccounts, } from '@hubspot/local-dev-lib/config';
|
|
4
|
-
import { getAllHsProfiles, getHsProfileFilename, loadHsProfileFile, } from '@hubspot/project-parsing-lib
|
|
4
|
+
import { getAllHsProfiles, getHsProfileFilename, loadHsProfileFile, } from '@hubspot/project-parsing-lib';
|
|
5
5
|
import { trackCommandUsage } from '../../../lib/usageTracking.js';
|
|
6
6
|
import { getProjectConfig } from '../../../lib/projects/config.js';
|
|
7
7
|
import { uiAccountDescription } from '../../../lib/ui/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { getAllHsProfiles, getHsProfileFilename, loadHsProfileFile, } from '@hubspot/project-parsing-lib
|
|
3
|
+
import { getAllHsProfiles, getHsProfileFilename, loadHsProfileFile, } from '@hubspot/project-parsing-lib';
|
|
4
4
|
import { fetchProject, deleteProject, } from '@hubspot/local-dev-lib/api/projects';
|
|
5
5
|
import { getConfigAccountById } from '@hubspot/local-dev-lib/config';
|
|
6
6
|
import { trackCommandUsage } from '../../../lib/usageTracking.js';
|
package/lang/en.d.ts
CHANGED
|
@@ -3085,6 +3085,7 @@ export declare const lib: {
|
|
|
3085
3085
|
compressing: (path: string) => string;
|
|
3086
3086
|
fileFiltered: (filename: string) => string;
|
|
3087
3087
|
legacyFileDetected: (filename: string, platformVersion: string) => string;
|
|
3088
|
+
projectDoesNotExist: (accountId: number) => string;
|
|
3088
3089
|
};
|
|
3089
3090
|
};
|
|
3090
3091
|
importData: {
|
package/lang/en.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { mapToUserFriendlyName } from '@hubspot/project-parsing-lib
|
|
2
|
+
import { mapToUserFriendlyName } from '@hubspot/project-parsing-lib';
|
|
3
3
|
import { PLATFORM_VERSIONS } from '@hubspot/local-dev-lib/constants/projects';
|
|
4
4
|
import { PERSONAL_ACCESS_KEY_AUTH_METHOD } from '@hubspot/local-dev-lib/constants/auth';
|
|
5
5
|
import { ARCHIVED_HUBSPOT_CONFIG_YAML_FILE_NAME, GLOBAL_CONFIG_PATH, DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME, } from '@hubspot/local-dev-lib/constants/config';
|
|
@@ -3107,6 +3107,7 @@ export const lib = {
|
|
|
3107
3107
|
compressing: (path) => `Compressing build files to "${path}"`,
|
|
3108
3108
|
fileFiltered: (filename) => `Ignore rule triggered for "${filename}"`,
|
|
3109
3109
|
legacyFileDetected: (filename, platformVersion) => `The ${chalk.bold(filename)} file is not supported on platform version ${chalk.bold(platformVersion)} and will be ignored.`,
|
|
3110
|
+
projectDoesNotExist: (accountId) => `Upload cancelled. Run ${uiCommandReference('hs project upload')} again to create the project in ${uiAccountDescription(accountId)}.`,
|
|
3110
3111
|
},
|
|
3111
3112
|
},
|
|
3112
3113
|
importData: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import { loadHsProfileFile, getHsProfileFilename, getAllHsProfiles, } from '@hubspot/project-parsing-lib
|
|
2
|
+
import { loadHsProfileFile, getHsProfileFilename, getAllHsProfiles, } from '@hubspot/project-parsing-lib';
|
|
3
3
|
import { lib } from '../../lang/en.js';
|
|
4
4
|
import { uiBetaTag, uiLine } from '../ui/index.js';
|
|
5
5
|
import { uiLogger } from '../ui/logger.js';
|
|
6
6
|
import { EXIT_CODES } from '../enums/exitCodes.js';
|
|
7
7
|
import { logProfileHeader, logProfileFooter, loadProfile, exitIfUsingProfiles, } from '../projectProfiles.js';
|
|
8
8
|
// Mock dependencies
|
|
9
|
-
vi.mock('@hubspot/project-parsing-lib
|
|
9
|
+
vi.mock('@hubspot/project-parsing-lib');
|
|
10
10
|
vi.mock('../ui');
|
|
11
11
|
vi.mock('../ui/logger');
|
|
12
12
|
vi.mock('../../lang/en');
|
|
@@ -2,7 +2,7 @@ import { uiLogger } from '../../ui/logger.js';
|
|
|
2
2
|
import { getCwd, sanitizeFileName } from '@hubspot/local-dev-lib/path';
|
|
3
3
|
import { extractZipArchive } from '@hubspot/local-dev-lib/archive';
|
|
4
4
|
import { getConfigAccountById } from '@hubspot/local-dev-lib/config';
|
|
5
|
-
import { validateUid } from '@hubspot/project-parsing-lib
|
|
5
|
+
import { validateUid } from '@hubspot/project-parsing-lib';
|
|
6
6
|
import { UNMIGRATABLE_REASONS } from '@hubspot/local-dev-lib/constants/projects';
|
|
7
7
|
import { MIGRATION_STATUS } from '@hubspot/local-dev-lib/types/Migration';
|
|
8
8
|
import { downloadProject } from '@hubspot/local-dev-lib/api/projects';
|
|
@@ -17,7 +17,7 @@ import { getUnmigratableReason, generateFilterAppsByProjectNameFunction, buildEr
|
|
|
17
17
|
vi.mock('../../ui/logger.js');
|
|
18
18
|
vi.mock('@hubspot/local-dev-lib/path');
|
|
19
19
|
vi.mock('@hubspot/local-dev-lib/archive');
|
|
20
|
-
vi.mock('@hubspot/project-parsing-lib
|
|
20
|
+
vi.mock('@hubspot/project-parsing-lib');
|
|
21
21
|
vi.mock('@hubspot/local-dev-lib/api/projects');
|
|
22
22
|
vi.mock('inquirer');
|
|
23
23
|
vi.mock('../../prompts/promptUtils');
|
package/lib/app/migrate.js
CHANGED
|
@@ -2,9 +2,9 @@ import path from 'path';
|
|
|
2
2
|
import { getCwd, sanitizeFileName } from '@hubspot/local-dev-lib/path';
|
|
3
3
|
import { extractZipArchive } from '@hubspot/local-dev-lib/archive';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
|
-
import { validateUid } from '@hubspot/project-parsing-lib
|
|
5
|
+
import { validateUid } from '@hubspot/project-parsing-lib';
|
|
6
6
|
import { UNMIGRATABLE_REASONS } from '@hubspot/local-dev-lib/constants/projects';
|
|
7
|
-
import { mapToUserFacingType } from '@hubspot/project-parsing-lib/transform';
|
|
7
|
+
import { mapToUserFacingType } from '@hubspot/project-parsing-lib/src/lib/transform.js';
|
|
8
8
|
import { MIGRATION_STATUS } from '@hubspot/local-dev-lib/types/Migration';
|
|
9
9
|
import { downloadProject } from '@hubspot/local-dev-lib/api/projects';
|
|
10
10
|
import { Separator } from '@inquirer/prompts';
|
|
@@ -58,7 +58,7 @@ export async function autoUpdateCLI(argv) {
|
|
|
58
58
|
notifier.update &&
|
|
59
59
|
!argv.useEnv &&
|
|
60
60
|
!process.env.SKIP_HUBSPOT_CLI_AUTO_UPDATES &&
|
|
61
|
-
config?.allowAutoUpdates
|
|
61
|
+
config?.allowAutoUpdates === true &&
|
|
62
62
|
!preventAutoUpdateForCommand(argv._)) {
|
|
63
63
|
// Ignore all update notifications if the current version is a pre-release
|
|
64
64
|
if (!notifier.update.current.includes('-')) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import { getConfigAccountIfExists, validateConfig, getConfigDefaultAccountIfExists, configFileExists, } from '@hubspot/local-dev-lib/config';
|
|
3
|
+
import { ENVIRONMENT_VARIABLES } from '@hubspot/local-dev-lib/constants/config';
|
|
3
4
|
import { getCwd } from '@hubspot/local-dev-lib/path';
|
|
4
5
|
import { validateAccount } from '../validation.js';
|
|
5
6
|
import { EXIT_CODES } from '../enums/exitCodes.js';
|
|
@@ -22,7 +23,7 @@ export function handleDeprecatedEnvVariables(argv) {
|
|
|
22
23
|
export function handleCustomConfigLocationMiddleware(argv) {
|
|
23
24
|
const { useEnv, config } = argv;
|
|
24
25
|
if (useEnv) {
|
|
25
|
-
process.env.USE_ENVIRONMENT_HUBSPOT_CONFIG = 'true';
|
|
26
|
+
process.env[ENVIRONMENT_VARIABLES.USE_ENVIRONMENT_HUBSPOT_CONFIG] = 'true';
|
|
26
27
|
}
|
|
27
28
|
else if (config && typeof config === 'string') {
|
|
28
29
|
const absoluteConfigPath = path.isAbsolute(config)
|
|
@@ -74,7 +75,8 @@ export async function validateConfigMiddleware(argv) {
|
|
|
74
75
|
}
|
|
75
76
|
// We don't run validation for auth because users should be able to run it when
|
|
76
77
|
// no accounts are configured, but we still want to exit if the config file is not found
|
|
77
|
-
if (!process.env.USE_ENVIRONMENT_HUBSPOT_CONFIG &&
|
|
78
|
+
if (!process.env[ENVIRONMENT_VARIABLES.USE_ENVIRONMENT_HUBSPOT_CONFIG] &&
|
|
79
|
+
!configFileExists()) {
|
|
78
80
|
console.error('Config file not found, run hs account auth to configure your account');
|
|
79
81
|
process.exit(EXIT_CODES.ERROR);
|
|
80
82
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { getConfigFilePath, globalConfigFileExists, } from '@hubspot/local-dev-lib/config';
|
|
2
|
+
import { ENVIRONMENT_VARIABLES } from '@hubspot/local-dev-lib/constants/config';
|
|
2
3
|
import { checkAndWarnGitInclusion } from '../ui/git.js';
|
|
3
4
|
import { debugError } from '../errorHandlers/index.js';
|
|
4
5
|
export function checkAndWarnGitInclusionMiddleware(argv) {
|
|
5
|
-
// Skip this when no command is provided
|
|
6
|
-
if (argv._.length
|
|
6
|
+
// Skip this when no command is provided or if using environment config
|
|
7
|
+
if (argv._.length &&
|
|
8
|
+
!process.env[ENVIRONMENT_VARIABLES.USE_ENVIRONMENT_HUBSPOT_CONFIG]) {
|
|
7
9
|
// Skip if using global config
|
|
8
10
|
if (globalConfigFileExists()) {
|
|
9
11
|
return;
|
package/lib/projectProfiles.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HsProfileFile } from '@hubspot/project-parsing-lib/src/lib/types.js';
|
|
2
2
|
import { ProjectConfig } from '../types/Projects.js';
|
|
3
3
|
export declare function logProfileHeader(profileName: string): void;
|
|
4
4
|
export declare function logProfileFooter(profile: HsProfileFile, includeVariables?: boolean): void;
|
package/lib/projectProfiles.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import { loadHsProfileFile, getHsProfileFilename, getAllHsProfiles, } from '@hubspot/project-parsing-lib
|
|
2
|
+
import { loadHsProfileFile, getHsProfileFilename, getAllHsProfiles, } from '@hubspot/project-parsing-lib';
|
|
3
3
|
import { lib } from '../lang/en.js';
|
|
4
4
|
import { uiBetaTag, uiLine } from './ui/index.js';
|
|
5
5
|
import { uiLogger } from './ui/logger.js';
|
|
@@ -16,7 +16,6 @@ vi.mock('@hubspot/local-dev-lib/portManager', () => ({
|
|
|
16
16
|
}));
|
|
17
17
|
vi.mock('@hubspot/local-dev-lib/api/localDevAuth', () => ({
|
|
18
18
|
fetchAppInstallationData: vi.fn().mockResolvedValue({}),
|
|
19
|
-
LOCALDEVAUTH_ACCESS_TOKEN_PATH: '/localdevauth/v1/auth/accessToken',
|
|
20
19
|
}));
|
|
21
20
|
vi.mock('@hubspot/local-dev-lib/api/appsDev', () => ({
|
|
22
21
|
fetchAppMetadataByUid: vi.fn().mockResolvedValue({}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import { translateForLocalDev } from '@hubspot/project-parsing-lib
|
|
2
|
+
import { translateForLocalDev } from '@hubspot/project-parsing-lib';
|
|
3
3
|
import { handleProjectUpload } from '../upload.js';
|
|
4
4
|
import { handleProjectDeploy } from '../deploy.js';
|
|
5
5
|
import { getProjectConfig } from '../config.js';
|
|
@@ -20,7 +20,7 @@ vi.mock('@hubspot/ui-extensions-dev-server', () => ({
|
|
|
20
20
|
},
|
|
21
21
|
}));
|
|
22
22
|
vi.mock('open');
|
|
23
|
-
vi.mock('@hubspot/project-parsing-lib
|
|
23
|
+
vi.mock('@hubspot/project-parsing-lib');
|
|
24
24
|
vi.mock('../upload');
|
|
25
25
|
vi.mock('../deploy');
|
|
26
26
|
vi.mock('../config');
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import { handleComponentCollision, updateHsMetaFilesWithAutoGeneratedFields, } from '../components.js';
|
|
3
3
|
import { uiLogger } from '../../ui/logger.js';
|
|
4
|
-
import { coerceToValidUid } from '@hubspot/project-parsing-lib
|
|
4
|
+
import { coerceToValidUid } from '@hubspot/project-parsing-lib';
|
|
5
5
|
import { fileExists } from '../../validation.js';
|
|
6
6
|
vi.mock('fs');
|
|
7
7
|
vi.mock('../../ui/logger.js');
|
|
8
8
|
vi.mock('../../validation.js');
|
|
9
|
-
vi.mock('@hubspot/project-parsing-lib
|
|
9
|
+
vi.mock('@hubspot/project-parsing-lib', () => ({
|
|
10
10
|
coerceToValidUid: vi.fn(),
|
|
11
|
+
metafileExtension: '.module.meta.json',
|
|
11
12
|
}));
|
|
12
|
-
vi.mock('@hubspot/project-parsing-lib/constants', () => ({
|
|
13
|
-
|
|
14
|
-
APP_KEY: 'app',
|
|
13
|
+
vi.mock('@hubspot/project-parsing-lib/src/lib/constants.js', () => ({
|
|
14
|
+
AppKey: 'app',
|
|
15
15
|
}));
|
|
16
16
|
const mockedFs = vi.mocked(fs);
|
|
17
17
|
const mockCoerceToValidUid = vi.mocked(coerceToValidUid);
|
|
@@ -54,6 +54,11 @@ describe('lib/projects/components', () => {
|
|
|
54
54
|
mockedFs.readFileSync.mockReturnValue(mockMetaContent);
|
|
55
55
|
mockedFs.writeFileSync.mockImplementation(() => { });
|
|
56
56
|
mockedFs.copyFileSync.mockImplementation(() => { });
|
|
57
|
+
// Mock metafileExtension
|
|
58
|
+
Object.defineProperty(require('@hubspot/project-parsing-lib'), 'metafileExtension', {
|
|
59
|
+
value: '.module.meta.json',
|
|
60
|
+
writable: false,
|
|
61
|
+
});
|
|
57
62
|
handleComponentCollision(collision);
|
|
58
63
|
expect(mockedFs.readFileSync).toHaveBeenCalledWith('/src/path/component.module.meta.json', 'utf-8');
|
|
59
64
|
expect(mockedFs.writeFileSync).toHaveBeenCalledWith('/dest/path/component-2.module.meta.json', expect.stringContaining('source-2.js'));
|
|
@@ -129,6 +134,11 @@ describe('lib/projects/components', () => {
|
|
|
129
134
|
.mockReturnValueOnce(JSON.stringify(newPackageJson));
|
|
130
135
|
mockedFs.writeFileSync.mockImplementation(() => { });
|
|
131
136
|
mockedFs.copyFileSync.mockImplementation(() => { });
|
|
137
|
+
// Mock metafileExtension
|
|
138
|
+
Object.defineProperty(require('@hubspot/project-parsing-lib'), 'metafileExtension', {
|
|
139
|
+
value: '.module.meta.json',
|
|
140
|
+
writable: false,
|
|
141
|
+
});
|
|
132
142
|
const consoleSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
|
|
133
143
|
handleComponentCollision(collision);
|
|
134
144
|
// Verify source files are copied with new names
|
|
@@ -161,6 +171,11 @@ describe('lib/projects/components', () => {
|
|
|
161
171
|
'package.json',
|
|
162
172
|
],
|
|
163
173
|
};
|
|
174
|
+
// Mock metafileExtension
|
|
175
|
+
Object.defineProperty(require('@hubspot/project-parsing-lib'), 'metafileExtension', {
|
|
176
|
+
value: '.meta.json',
|
|
177
|
+
writable: false,
|
|
178
|
+
});
|
|
164
179
|
const mockMetaContent = '{}';
|
|
165
180
|
mockedFs.readFileSync.mockReturnValue(mockMetaContent);
|
|
166
181
|
mockedFs.writeFileSync.mockImplementation(() => { });
|
|
@@ -4,14 +4,15 @@ import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
|
|
|
4
4
|
import { downloadProject } from '@hubspot/local-dev-lib/api/projects';
|
|
5
5
|
import { extractZipArchive } from '@hubspot/local-dev-lib/archive';
|
|
6
6
|
import { isDeepEqual } from '@hubspot/local-dev-lib/isDeepEqual';
|
|
7
|
-
import { translate
|
|
7
|
+
import { translate } from '@hubspot/project-parsing-lib';
|
|
8
8
|
import { isDeployedProjectUpToDateWithLocal } from '../localDev/helpers/project.js';
|
|
9
9
|
// Mock all external dependencies
|
|
10
10
|
vi.mock('@hubspot/local-dev-lib/api/projects');
|
|
11
11
|
vi.mock('@hubspot/local-dev-lib/archive');
|
|
12
|
-
vi.mock('@hubspot/project-parsing-lib
|
|
12
|
+
vi.mock('@hubspot/project-parsing-lib');
|
|
13
13
|
vi.mock('@hubspot/local-dev-lib/isDeepEqual');
|
|
14
14
|
vi.mock('fs-extra');
|
|
15
|
+
vi.mock('os');
|
|
15
16
|
vi.mock('../../utils/isDeepEqual.js');
|
|
16
17
|
describe('isDeployedProjectUpToDateWithLocal', () => {
|
|
17
18
|
const mockProjectName = 'test-project';
|
|
@@ -51,7 +52,7 @@ describe('isDeployedProjectUpToDateWithLocal', () => {
|
|
|
51
52
|
// Mock fs.remove
|
|
52
53
|
fs.remove.mockResolvedValue(undefined);
|
|
53
54
|
// Mock os.tmpdir
|
|
54
|
-
|
|
55
|
+
os.tmpdir.mockReturnValue('/tmp');
|
|
55
56
|
});
|
|
56
57
|
afterEach(() => {
|
|
57
58
|
vi.restoreAllMocks();
|
|
@@ -5,7 +5,7 @@ import { createV2App } from '../../create/v2.js';
|
|
|
5
5
|
import { confirmPrompt } from '../../../prompts/promptUtils.js';
|
|
6
6
|
import { projectAddPromptV2 } from '../../../prompts/projectAddPrompt.js';
|
|
7
7
|
import { cloneGithubRepo } from '@hubspot/local-dev-lib/github';
|
|
8
|
-
import { getProjectMetadata } from '@hubspot/project-parsing-lib/
|
|
8
|
+
import { getProjectMetadata } from '@hubspot/project-parsing-lib/src/lib/project.js';
|
|
9
9
|
import { trackCommandUsage } from '../../../usageTracking.js';
|
|
10
10
|
import { updateHsMetaFilesWithAutoGeneratedFields } from '../../components.js';
|
|
11
11
|
import { commands } from '../../../../lang/en.js';
|
|
@@ -17,7 +17,7 @@ vi.mock('../../../prompts/projectAddPrompt');
|
|
|
17
17
|
vi.mock('@hubspot/local-dev-lib/github');
|
|
18
18
|
vi.mock('../../../ui/logger.js');
|
|
19
19
|
vi.mock('../../../ui/SpinniesManager.js');
|
|
20
|
-
vi.mock('@hubspot/project-parsing-lib/
|
|
20
|
+
vi.mock('@hubspot/project-parsing-lib/src/lib/project');
|
|
21
21
|
vi.mock('../../../usageTracking');
|
|
22
22
|
vi.mock('../../components.js');
|
|
23
23
|
const mockedFs = vi.mocked(fs);
|
|
@@ -7,8 +7,8 @@ import fs from 'fs';
|
|
|
7
7
|
import { projectAddPromptV2 } from '../../prompts/projectAddPrompt.js';
|
|
8
8
|
import { HUBSPOT_PROJECT_COMPONENTS_GITHUB_PATH, DEFAULT_PROJECT_TEMPLATE_BRANCH, } from '../../constants.js';
|
|
9
9
|
import { updateHsMetaFilesWithAutoGeneratedFields, handleComponentCollision, } from '../components.js';
|
|
10
|
-
import { getProjectMetadata, } from '@hubspot/project-parsing-lib/
|
|
11
|
-
import {
|
|
10
|
+
import { getProjectMetadata, } from '@hubspot/project-parsing-lib/src/lib/project.js';
|
|
11
|
+
import { AppKey } from '@hubspot/project-parsing-lib/src/lib/constants.js';
|
|
12
12
|
import { cloneGithubRepo } from '@hubspot/local-dev-lib/github';
|
|
13
13
|
import { debugError } from '../../errorHandlers/index.js';
|
|
14
14
|
import { uiLogger } from '../../ui/logger.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Collision } from '@hubspot/local-dev-lib/types/Archive';
|
|
2
|
-
import
|
|
2
|
+
import { ProjectMetadata } from '@hubspot/project-parsing-lib/src/lib/project.js';
|
|
3
3
|
export declare function handleComponentCollision({ dest, src, collisions }: Collision): void;
|
|
4
4
|
export declare function updateHsMetaFilesWithAutoGeneratedFields(projectName: string, hsMetaFilePaths: string[], existingUids?: string[], options?: {
|
|
5
5
|
currentProjectMetadata?: ProjectMetadata;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import fs from 'fs';
|
|
3
|
-
import { coerceToValidUid } from '@hubspot/project-parsing-lib
|
|
4
|
-
import { METAFILE_EXTENSION as metafileExtension, APP_KEY as AppKey, } from '@hubspot/project-parsing-lib/constants';
|
|
3
|
+
import { coerceToValidUid, metafileExtension, } from '@hubspot/project-parsing-lib';
|
|
5
4
|
import { fileExists } from '../validation.js';
|
|
6
5
|
import { uiLogger } from '../ui/logger.js';
|
|
6
|
+
import { AppKey } from '@hubspot/project-parsing-lib/src/lib/constants.js';
|
|
7
7
|
import { lib } from '../../lang/en.js';
|
|
8
8
|
import { debugError } from '../errorHandlers/index.js';
|
|
9
9
|
import { uiLink } from '../ui/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Separator } from '@inquirer/prompts';
|
|
2
2
|
import { ComponentTemplate, ComponentTemplateChoice, ProjectTemplateRepoConfig } from '../../../types/Projects.js';
|
|
3
|
-
import
|
|
3
|
+
import { ProjectMetadata } from '@hubspot/project-parsing-lib/src/lib/project.js';
|
|
4
4
|
import { SelectProjectTemplatePromptResponse } from '../../prompts/selectProjectTemplatePrompt.js';
|
|
5
5
|
export declare function createV2App(providedAuth: string | undefined, providedDistribution: string | undefined): Promise<{
|
|
6
6
|
authType: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { marketplaceDistribution, oAuth, privateDistribution, staticAuth, EMPTY_PROJECT, PROJECT_WITH_APP, FEATURES, } from '../../constants.js';
|
|
2
2
|
import { commands, lib } from '../../../lang/en.js';
|
|
3
3
|
import { listPrompt } from '../../prompts/promptUtils.js';
|
|
4
|
-
import { APP_EVENTS_KEY as AppEventsKey, PAGES_KEY as PagesKey, } from '@hubspot/project-parsing-lib/constants';
|
|
5
4
|
import { isV2Project } from '../platformVersion.js';
|
|
6
5
|
import path from 'path';
|
|
7
6
|
import { getConfigForPlatformVersion } from './legacy.js';
|
|
8
7
|
import { logError } from '../../errorHandlers/index.js';
|
|
9
8
|
import { EXIT_CODES } from '../../enums/exitCodes.js';
|
|
10
9
|
import { hasFeature } from '../../hasFeature.js';
|
|
10
|
+
import { AppEventsKey, PagesKey, } from '@hubspot/project-parsing-lib/src/lib/constants.js';
|
|
11
11
|
export async function createV2App(providedAuth, providedDistribution) {
|
|
12
12
|
let authType;
|
|
13
13
|
if (providedAuth &&
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types.js';
|
|
2
2
|
import { Project } from '@hubspot/local-dev-lib/types/Project';
|
|
3
3
|
import LocalDevState from './LocalDevState.js';
|
|
4
4
|
import LocalDevLogger from './LocalDevLogger.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { translateForLocalDev
|
|
1
|
+
import { translateForLocalDev } from '@hubspot/project-parsing-lib';
|
|
2
2
|
import { hasLocalStateFlag } from '@hubspot/local-dev-lib/config';
|
|
3
3
|
import { fetchProject } from '@hubspot/local-dev-lib/api/projects';
|
|
4
4
|
import path from 'path';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { HSProfileVariables } from '@hubspot/project-parsing-lib/profiles';
|
|
1
|
+
import { IntermediateRepresentationNodeLocalDev, HSProfileVariables } from '@hubspot/project-parsing-lib/src/lib/types.js';
|
|
3
2
|
import { Environment } from '@hubspot/local-dev-lib/types/Config';
|
|
4
3
|
import { Project } from '@hubspot/local-dev-lib/types/Project';
|
|
5
4
|
import { ProjectConfig } from '../../../types/Projects.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/translate';
|
|
2
1
|
import { Build } from '@hubspot/local-dev-lib/types/Build';
|
|
3
2
|
import { Project } from '@hubspot/local-dev-lib/types/Project';
|
|
3
|
+
import { IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types.js';
|
|
4
4
|
import { ProjectConfig } from '../../../../types/Projects.js';
|
|
5
5
|
export declare function createNewProjectForLocalDev(projectConfig: ProjectConfig, targetAccountId: number, shouldCreateWithoutConfirmation: boolean, hasPublicApps: boolean): Promise<Project>;
|
|
6
6
|
export declare function createInitialBuildForNewProject(projectConfig: ProjectConfig, projectDir: string, targetAccountId: number, sendIR?: boolean, profile?: string): Promise<Build>;
|
|
@@ -6,7 +6,7 @@ import { downloadProject } from '@hubspot/local-dev-lib/api/projects';
|
|
|
6
6
|
import { extractZipArchive } from '@hubspot/local-dev-lib/archive';
|
|
7
7
|
import { sanitizeFileName } from '@hubspot/local-dev-lib/path';
|
|
8
8
|
import { isDeepEqual } from '@hubspot/local-dev-lib/isDeepEqual';
|
|
9
|
-
import { translate
|
|
9
|
+
import { translate } from '@hubspot/project-parsing-lib';
|
|
10
10
|
import { isSpecifiedError } from '@hubspot/local-dev-lib/errors/index';
|
|
11
11
|
import { PROJECT_ERROR_TYPES, PROJECT_BUILD_TEXT, PROJECT_DEPLOY_TEXT, } from '../../../constants.js';
|
|
12
12
|
import { lib } from '../../../../lang/en.js';
|
|
@@ -8,8 +8,8 @@ import { getProjectBuildDetailUrl, getProjectDeployDetailUrl, getProjectActivity
|
|
|
8
8
|
import { EXIT_CODES } from '../enums/exitCodes.js';
|
|
9
9
|
import { lib } from '../../lang/en.js';
|
|
10
10
|
import { uiLogger } from '../ui/logger.js';
|
|
11
|
-
import {
|
|
12
|
-
import { mapToInternalType } from '@hubspot/project-parsing-lib
|
|
11
|
+
import { AppFunctionsPackageKey } from '@hubspot/project-parsing-lib/src/lib/constants.js';
|
|
12
|
+
import { mapToInternalType } from '@hubspot/project-parsing-lib';
|
|
13
13
|
const SPINNER_STATUS = {
|
|
14
14
|
SPINNING: 'spinning',
|
|
15
15
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentTypes, Component, GenericComponentConfig, PublicAppComponentConfig, PrivateAppComponentConfig, AppCardComponentConfig } from '../../types/Projects.js';
|
|
2
|
-
import
|
|
2
|
+
import { IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types.js';
|
|
3
3
|
import { AppIRNode } from '../../types/ProjectComponents.js';
|
|
4
4
|
export declare const CONFIG_FILES: {
|
|
5
5
|
[k in ComponentTypes]: string;
|
package/lib/projects/upload.js
CHANGED
|
@@ -4,8 +4,7 @@ import fs from 'fs-extra';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { uploadProject } from '@hubspot/local-dev-lib/api/projects';
|
|
6
6
|
import { shouldIgnoreFile } from '@hubspot/local-dev-lib/ignoreRules';
|
|
7
|
-
import { isTranslationError, translate, } from '@hubspot/project-parsing-lib
|
|
8
|
-
import { projectContainsHsMetaFiles } from '@hubspot/project-parsing-lib/projects';
|
|
7
|
+
import { isTranslationError, translate, projectContainsHsMetaFiles, } from '@hubspot/project-parsing-lib';
|
|
9
8
|
import SpinniesManager from '../ui/SpinniesManager.js';
|
|
10
9
|
import { uiAccountDescription } from '../ui/index.js';
|
|
11
10
|
import { logError } from '../errorHandlers/index.js';
|
|
@@ -76,10 +75,15 @@ export async function handleProjectUpload({ accountId, projectConfig, projectDir
|
|
|
76
75
|
resolve({ uploadError: e });
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
|
-
await ensureProjectExists(accountId, projectConfig.name, {
|
|
78
|
+
const { projectExists } = await ensureProjectExists(accountId, projectConfig.name, {
|
|
80
79
|
forceCreate,
|
|
81
80
|
uploadCommand: isUploadCommand,
|
|
81
|
+
noLogs: true,
|
|
82
82
|
});
|
|
83
|
+
if (!projectExists) {
|
|
84
|
+
uiLogger.log(lib.projectUpload.handleProjectUpload.projectDoesNotExist(accountId));
|
|
85
|
+
process.exit(EXIT_CODES.SUCCESS);
|
|
86
|
+
}
|
|
83
87
|
const { buildId, error } = await uploadProjectFiles(accountId, projectConfig.name, tempFile.name, uploadMessage, projectConfig.platformVersion, intermediateRepresentation);
|
|
84
88
|
if (error) {
|
|
85
89
|
resolve({ uploadError: error });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getProjectThemeDetails, migrateThemes, } from '@hubspot/project-parsing-lib
|
|
1
|
+
import { getProjectThemeDetails, migrateThemes, } from '@hubspot/project-parsing-lib';
|
|
2
2
|
import { getConfigAccountById } from '@hubspot/local-dev-lib/config';
|
|
3
3
|
import { confirmPrompt } from '../../prompts/promptUtils.js';
|
|
4
4
|
import { writeProjectConfig, } from '../../projects/config.js';
|
|
@@ -8,7 +8,7 @@ import { fetchMigrationApps } from '../../app/migrate.js';
|
|
|
8
8
|
import { getHasMigratableThemes, validateMigrationAppsAndThemes, handleThemesMigration, migrateThemes2025_2, } from '../migrate.js';
|
|
9
9
|
import { lib } from '../../../lang/en.js';
|
|
10
10
|
vi.mock('../../ui/logger.js');
|
|
11
|
-
vi.mock('@hubspot/project-parsing-lib
|
|
11
|
+
vi.mock('@hubspot/project-parsing-lib');
|
|
12
12
|
vi.mock('../../prompts/promptUtils');
|
|
13
13
|
vi.mock('../../projects/config');
|
|
14
14
|
vi.mock('../../projects/ensureProjectExists');
|
package/lib/theme/migrate.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import { migrateThemes, getProjectThemeDetails, } from '@hubspot/project-parsing-lib
|
|
2
|
+
import { migrateThemes, getProjectThemeDetails, } from '@hubspot/project-parsing-lib';
|
|
3
3
|
import { writeProjectConfig } from '../projects/config.js';
|
|
4
4
|
import { ensureProjectExists } from '../projects/ensureProjectExists.js';
|
|
5
5
|
import SpinniesManager from '../ui/SpinniesManager.js';
|
|
@@ -2,8 +2,7 @@ import { Tool } from '../../types.js';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { formatTextContents } from '../../utils/content.js';
|
|
4
4
|
import { absoluteCurrentWorkingDirectory } from './constants.js';
|
|
5
|
-
import { getIntermediateRepresentationSchema } from '@hubspot/project-parsing-lib
|
|
6
|
-
import { mapToInternalType } from '@hubspot/project-parsing-lib/transform';
|
|
5
|
+
import { getIntermediateRepresentationSchema, mapToInternalType, } from '@hubspot/project-parsing-lib';
|
|
7
6
|
import { isV2Project } from '../../../lib/projects/platformVersion.js';
|
|
8
7
|
import { getConfigDefaultAccountIfExists } from '@hubspot/local-dev-lib/config';
|
|
9
8
|
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import z from 'zod';
|
|
3
|
-
import { getAllHsProfiles } from '@hubspot/project-parsing-lib
|
|
3
|
+
import { getAllHsProfiles } from '@hubspot/project-parsing-lib';
|
|
4
4
|
import { getProjectConfig } from '../../../lib/projects/config.js';
|
|
5
5
|
import { Tool } from '../../types.js';
|
|
6
6
|
import { runCommandInDir } from '../../utils/project.js';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { GetConfigValuesTool } from '../GetConfigValuesTool.js';
|
|
2
|
-
import { getIntermediateRepresentationSchema } from '@hubspot/project-parsing-lib
|
|
3
|
-
import { mapToInternalType } from '@hubspot/project-parsing-lib/transform';
|
|
2
|
+
import { getIntermediateRepresentationSchema, mapToInternalType, } from '@hubspot/project-parsing-lib';
|
|
4
3
|
import { getConfigDefaultAccountIfExists } from '@hubspot/local-dev-lib/config';
|
|
5
4
|
import { mcpFeedbackRequest } from '../../../utils/feedbackTracking.js';
|
|
6
5
|
vi.mock('@modelcontextprotocol/sdk/server/mcp.js');
|
|
7
|
-
vi.mock('@hubspot/project-parsing-lib
|
|
8
|
-
vi.mock('@hubspot/project-parsing-lib/transform');
|
|
6
|
+
vi.mock('@hubspot/project-parsing-lib');
|
|
9
7
|
vi.mock('@hubspot/local-dev-lib/config');
|
|
10
8
|
vi.mock('../../../utils/toolUsageTracking');
|
|
11
9
|
vi.mock('../../../utils/feedbackTracking');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { UploadProjectTools } from '../UploadProjectTools.js';
|
|
2
|
-
import { getAllHsProfiles } from '@hubspot/project-parsing-lib
|
|
2
|
+
import { getAllHsProfiles } from '@hubspot/project-parsing-lib';
|
|
3
3
|
import { getProjectConfig } from '../../../../lib/projects/config.js';
|
|
4
4
|
import { runCommandInDir } from '../../../utils/project.js';
|
|
5
5
|
import { mcpFeedbackRequest } from '../../../utils/feedbackTracking.js';
|
|
6
6
|
vi.mock('@modelcontextprotocol/sdk/server/mcp.js');
|
|
7
|
-
vi.mock('@hubspot/project-parsing-lib
|
|
7
|
+
vi.mock('@hubspot/project-parsing-lib');
|
|
8
8
|
vi.mock('../../../../lib/projects/config.js');
|
|
9
9
|
vi.mock('../../../utils/project');
|
|
10
10
|
vi.mock('../../../utils/toolUsageTracking');
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cli",
|
|
3
|
-
"version": "7.11.
|
|
3
|
+
"version": "7.11.8-experimental.0",
|
|
4
4
|
"description": "The official CLI for developing on HubSpot",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": "https://github.com/HubSpot/hubspot-cli",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@hubspot/local-dev-lib": "4.0.4",
|
|
10
|
-
"@hubspot/project-parsing-lib": "0.
|
|
10
|
+
"@hubspot/project-parsing-lib": "0.10.2",
|
|
11
11
|
"@hubspot/serverless-dev-runtime": "7.0.7",
|
|
12
12
|
"@hubspot/theme-preview-dev-server": "0.0.12",
|
|
13
|
-
"@hubspot/ui-extensions-dev-server": "1.
|
|
13
|
+
"@hubspot/ui-extensions-dev-server": "1.1.2",
|
|
14
14
|
"archiver": "7.0.1",
|
|
15
15
|
"chalk": "5.4.1",
|
|
16
16
|
"chokidar": "3.6.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"yargs-parser": "21.1.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@hubspot/npm-scripts": "0.0
|
|
38
|
+
"@hubspot/npm-scripts": "0.1.0",
|
|
39
39
|
"@types/archiver": "^6.0.3",
|
|
40
40
|
"@types/cli-progress": "^3.11.6",
|
|
41
41
|
"@types/express": "^5.0.0",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"mcp-local": "yarn tsx ./scripts/mcp-local.ts",
|
|
85
85
|
"prettier:write": "prettier --write './**/*.{ts,js,json}'",
|
|
86
86
|
"release": "yarn tsx ./scripts/release.ts release",
|
|
87
|
+
"sync-to-public": "yarn tsx ./scripts/sync-to-public.ts repo-sync",
|
|
87
88
|
"view-ui": "yarn build && yarn tsx ./scripts/view-ui.ts",
|
|
88
89
|
"test": "vitest run",
|
|
89
90
|
"test-dev": "vitest",
|
|
@@ -107,11 +108,11 @@
|
|
|
107
108
|
}
|
|
108
109
|
},
|
|
109
110
|
"engines": {
|
|
110
|
-
"node": ">=
|
|
111
|
+
"node": ">=18"
|
|
111
112
|
},
|
|
112
113
|
"bin": {
|
|
113
|
-
"hs": "./bin/hs",
|
|
114
|
-
"hscms": "./bin/hscms"
|
|
114
|
+
"hs": "./bin/hs.js",
|
|
115
|
+
"hscms": "./bin/hscms.js"
|
|
115
116
|
},
|
|
116
117
|
"publishConfig": {
|
|
117
118
|
"access": "public",
|
package/types/LocalDev.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { HSProfileVariables } from '@hubspot/project-parsing-lib/profiles';
|
|
1
|
+
import { HSProfileVariables, IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types.js';
|
|
3
2
|
import { Environment } from '@hubspot/local-dev-lib/types/Config';
|
|
4
3
|
import { ValueOf } from '@hubspot/local-dev-lib/types/Utils';
|
|
5
4
|
import { Project } from '@hubspot/local-dev-lib/types/Project';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types.js';
|
|
2
2
|
import { IR_COMPONENT_TYPES, APP_DISTRIBUTION_TYPES, APP_AUTH_TYPES } from '../lib/constants.js';
|
|
3
3
|
import { ValueOf } from '@hubspot/local-dev-lib/types/Utils';
|
|
4
4
|
type AppDistributionType = ValueOf<typeof APP_DISTRIBUTION_TYPES>;
|
|
@@ -5,5 +5,5 @@ export function getBoxWithTitle(props) {
|
|
|
5
5
|
return _jsx(BoxWithTitle, { ...props });
|
|
6
6
|
}
|
|
7
7
|
export function BoxWithTitle({ title, message, titleBackgroundColor, borderColor, textCentered, }) {
|
|
8
|
-
return (_jsxs(Box, { ...CONTAINER_STYLES, borderStyle: "round", borderColor: borderColor, alignSelf: "flex-start", children: [_jsx(Box, { position: "absolute", marginTop: -2, paddingX: 0, alignSelf: "flex-start", justifyContent: "center", alignItems: "center", children: _jsx(Text, { backgroundColor: titleBackgroundColor, bold: true, children: ` ${title} ` }) }), _jsx(Box, { flexDirection: "column", width: "100%", rowGap: 1, children: message
|
|
8
|
+
return (_jsxs(Box, { ...CONTAINER_STYLES, borderStyle: "round", borderColor: borderColor, alignSelf: "flex-start", children: [_jsx(Box, { position: "absolute", marginTop: -2, paddingX: 0, alignSelf: "flex-start", justifyContent: "center", alignItems: "center", children: _jsx(Text, { backgroundColor: titleBackgroundColor, bold: true, children: ` ${title} ` }) }), _jsx(Box, { flexDirection: "column", width: "100%", rowGap: 1, children: message?.split('\n\n').map((section, sectionIndex) => (_jsx(Box, { flexDirection: "column", alignItems: textCentered ? 'center' : 'flex-start', children: section.split('\n').map((line, lineIndex) => (_jsx(Text, { children: line }, `${sectionIndex}-${lineIndex}`))) }, sectionIndex))) })] }));
|
|
9
9
|
}
|
/package/bin/{hs → hs.js}
RENAMED
|
File without changes
|
/package/bin/{hscms → hscms.js}
RENAMED
|
File without changes
|