@hubspot/cli 7.11.6-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 ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/bin/hscms.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
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
@@ -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: {
@@ -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 !== false &&
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 && !configFileExists()) {
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;
@@ -75,10 +75,15 @@ export async function handleProjectUpload({ accountId, projectConfig, projectDir
75
75
  resolve({ uploadError: e });
76
76
  }
77
77
  }
78
- await ensureProjectExists(accountId, projectConfig.name, {
78
+ const { projectExists } = await ensureProjectExists(accountId, projectConfig.name, {
79
79
  forceCreate,
80
80
  uploadCommand: isUploadCommand,
81
+ noLogs: true,
81
82
  });
83
+ if (!projectExists) {
84
+ uiLogger.log(lib.projectUpload.handleProjectUpload.projectDoesNotExist(accountId));
85
+ process.exit(EXIT_CODES.SUCCESS);
86
+ }
82
87
  const { buildId, error } = await uploadProjectFiles(accountId, projectConfig.name, tempFile.name, uploadMessage, projectConfig.platformVersion, intermediateRepresentation);
83
88
  if (error) {
84
89
  resolve({ uploadError: error });
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "7.11.6-experimental.0",
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
- "@hubspot/local-dev-lib": "4.0.3-beta.0",
9
+ "@hubspot/local-dev-lib": "4.0.4",
10
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.0.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.6",
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",
@@ -110,8 +111,8 @@
110
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",
@@ -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.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))) })] }));
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
  }
File without changes
File without changes