@hubspot/cli 7.11.1-beta.1 → 7.11.1-beta.3

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/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('-')) {
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "7.11.1-beta.1",
3
+ "version": "7.11.1-beta.3",
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",
@@ -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",
@@ -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
  }