@hubspot/local-dev-lib 0.7.4-experimental.0 → 0.7.4-experimental.2

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/config/index.d.ts CHANGED
@@ -17,7 +17,8 @@ export declare function getConfigAccountByName(accountName: string): HubSpotConf
17
17
  export declare function getConfigAccountIfExists(identifier: number | string): HubSpotConfigAccount | undefined;
18
18
  export declare function getConfigDefaultAccount(): HubSpotConfigAccount;
19
19
  export declare function getConfigDefaultAccountIfExists(): HubSpotConfigAccount | undefined;
20
- export declare function getAllConfigAccounts(showAll?: boolean): HubSpotConfigAccount[];
20
+ export declare function getAllConfigAccounts(): HubSpotConfigAccount[];
21
+ export declare function getLinkedConfigAccounts(): HubSpotConfigAccount[];
21
22
  export declare function getConfigAccountEnvironment(identifier: number | string): Environment;
22
23
  export declare function addConfigAccount(accountToAdd: HubSpotConfigAccount): void;
23
24
  export declare function updateConfigAccount(updatedAccount: HubSpotConfigAccount): void;
package/config/index.js CHANGED
@@ -153,11 +153,17 @@ export function getConfigAccountIfExists(identifier) {
153
153
  export function getConfigDefaultAccount() {
154
154
  const { accounts, defaultAccount } = getConfig();
155
155
  let defaultAccountToUse = defaultAccount;
156
- const currentConfigPath = getConfigFilePath();
157
- const globalConfigPath = getGlobalConfigFilePath();
158
- if (currentConfigPath === globalConfigPath && globalConfigFileExists()) {
159
- const defaultAccountOverrideAccountId = getDefaultAccountOverrideAccountId(accounts);
160
- defaultAccountToUse = defaultAccountOverrideAccountId || defaultAccount;
156
+ const hsSettingsFile = getHsSettingsFile();
157
+ if (hsSettingsFile && hsSettingsFile.localDefaultAccount) {
158
+ defaultAccountToUse = hsSettingsFile.localDefaultAccount;
159
+ }
160
+ else {
161
+ const currentConfigPath = getConfigFilePath();
162
+ const globalConfigPath = getGlobalConfigFilePath();
163
+ if (currentConfigPath === globalConfigPath && globalConfigFileExists()) {
164
+ const defaultAccountOverrideAccountId = getDefaultAccountOverrideAccountId(accounts);
165
+ defaultAccountToUse = defaultAccountOverrideAccountId || defaultAccount;
166
+ }
161
167
  }
162
168
  if (!defaultAccountToUse) {
163
169
  throw new HubSpotConfigError(i18n('config.getConfigDefaultAccount.fieldMissingError'), HUBSPOT_CONFIG_ERROR_TYPES.NO_DEFAULT_ACCOUNT, HUBSPOT_CONFIG_OPERATIONS.READ);
@@ -173,33 +179,36 @@ export function getConfigDefaultAccount() {
173
179
  export function getConfigDefaultAccountIfExists() {
174
180
  const { accounts, defaultAccount } = getConfig();
175
181
  let defaultAccountToUse = defaultAccount;
176
- // Only check for default account override if we're using the global config
177
- const currentConfigPath = getConfigFilePath();
178
- const globalConfigPath = getGlobalConfigFilePath();
179
- if (currentConfigPath === globalConfigPath && globalConfigFileExists()) {
180
- const defaultAccountOverrideAccountId = getDefaultAccountOverrideAccountId(accounts);
181
- defaultAccountToUse = defaultAccountOverrideAccountId || defaultAccount;
182
- }
183
- // Use the default account if .hs/settings.json is present
184
182
  const hsSettingsFile = getHsSettingsFile();
185
183
  if (hsSettingsFile && hsSettingsFile.localDefaultAccount) {
186
184
  defaultAccountToUse = hsSettingsFile.localDefaultAccount;
187
185
  }
186
+ else {
187
+ const currentConfigPath = getConfigFilePath();
188
+ const globalConfigPath = getGlobalConfigFilePath();
189
+ if (currentConfigPath === globalConfigPath && globalConfigFileExists()) {
190
+ const defaultAccountOverrideAccountId = getDefaultAccountOverrideAccountId(accounts);
191
+ defaultAccountToUse = defaultAccountOverrideAccountId || defaultAccount;
192
+ }
193
+ }
188
194
  if (!defaultAccountToUse) {
189
195
  return;
190
196
  }
191
197
  const account = getConfigAccountByInferredIdentifier(accounts, defaultAccountToUse);
192
198
  return account;
193
199
  }
194
- export function getAllConfigAccounts(showAll) {
195
- let { accounts } = getConfig();
196
- // Show only accounts in the .hs/settings.json file
197
- if (!showAll) {
198
- const hsSettingsFile = getHsSettingsFile();
199
- accounts = accounts.filter(a => hsSettingsFile ? hsSettingsFile.accounts.includes(a.accountId) : true);
200
- }
200
+ export function getAllConfigAccounts() {
201
+ const { accounts } = getConfig();
201
202
  return accounts;
202
203
  }
204
+ export function getLinkedConfigAccounts() {
205
+ const { accounts } = getConfig();
206
+ const hsSettingsFile = getHsSettingsFile();
207
+ if (!hsSettingsFile) {
208
+ return accounts;
209
+ }
210
+ return accounts.filter(a => hsSettingsFile.accounts.includes(a.accountId));
211
+ }
203
212
  export function getConfigAccountEnvironment(identifier) {
204
213
  const config = getConfig();
205
214
  const account = getConfigAccountByInferredIdentifier(config.accounts, identifier);
@@ -8,5 +8,6 @@ export declare const PLATFORM_VERSIONS: {
8
8
  v2023_2: string;
9
9
  v2025_1: string;
10
10
  v2025_2: string;
11
+ v2026_03_beta: string;
11
12
  unstable: string;
12
13
  };
@@ -8,5 +8,6 @@ export const PLATFORM_VERSIONS = {
8
8
  v2023_2: '2023.2',
9
9
  v2025_1: '2025.1',
10
10
  v2025_2: '2025.2',
11
+ v2026_03_beta: '2026.03-beta',
11
12
  unstable: 'unstable',
12
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/local-dev-lib",
3
- "version": "0.7.4-experimental.0",
3
+ "version": "0.7.4-experimental.2",
4
4
  "type": "module",
5
5
  "description": "Provides library functionality for HubSpot local development tooling, including the HubSpot CLI",
6
6
  "repository": {
@@ -81,7 +81,7 @@
81
81
  "http-proxy-agent": "7.0.2",
82
82
  "https-proxy-agent": "7.0.6",
83
83
  "ignore": "^7.0.0",
84
- "js-yaml": "4.1.0",
84
+ "js-yaml": "4.1.1",
85
85
  "moment": "2.30.1",
86
86
  "p-queue": "^7.0.0",
87
87
  "prettier": "^3.6.2",
package/types/Files.d.ts CHANGED
@@ -24,6 +24,7 @@ export type FileMapperInputOptions = {
24
24
  staging?: boolean;
25
25
  assetVersion?: string;
26
26
  overwrite?: boolean;
27
+ timeout?: number;
27
28
  };
28
29
  export type FileType = ValueOf<typeof FILE_TYPES>;
29
30
  type ResultType = ValueOf<typeof FILE_UPLOAD_RESULT_TYPES>;