@hubspot/local-dev-lib 5.7.0 → 5.7.1-beta.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/config/hsSettings.js +14 -4
- package/lib/gitignore.js +2 -2
- package/package.json +1 -1
- package/types/developerTestAccounts.d.ts +1 -0
package/config/hsSettings.js
CHANGED
|
@@ -5,15 +5,25 @@ import { HS_FOLDER, HS_README_FILENAME, HS_SETTINGS_FILENAME, } from '../constan
|
|
|
5
5
|
import { getCwd } from '../lib/path.js';
|
|
6
6
|
import { FileSystemError } from '../models/FileSystemError.js';
|
|
7
7
|
const HS_README_CONTENTS = `Why do I have a folder named ".hs" in my project?
|
|
8
|
-
The ".hs" folder is created when you link a directory to a HubSpot
|
|
8
|
+
The ".hs" folder is created when you link a directory to a HubSpot account using "hs account link". The CLI walks up parent directories to find the nearest ".hs/settings.json", so subdirectories inherit the same configuration.
|
|
9
9
|
|
|
10
10
|
What does the "settings.json" file contain?
|
|
11
11
|
The "settings.json" file contains:
|
|
12
|
-
- The ID(s) of the HubSpot account(s)
|
|
13
|
-
- The ID of the
|
|
12
|
+
- The ID(s) of the HubSpot account(s) linked to this directory ("accounts")
|
|
13
|
+
- The ID of the default account for this directory ("localDefaultAccount")
|
|
14
|
+
|
|
15
|
+
These accounts are a subset of those authenticated in your global CLI config (~/.hscli/config.yml).
|
|
14
16
|
|
|
15
17
|
Should I commit the ".hs" folder?
|
|
16
|
-
|
|
18
|
+
We recommend not committing this folder. These settings are per-developer configuration, and different team members typically use different accounts or defaults. If your directory is in a Git repository, ".hs" is automatically added to .gitignore when you link.
|
|
19
|
+
|
|
20
|
+
If your team shares the same accounts, you can remove the .gitignore entry and commit the folder.
|
|
21
|
+
|
|
22
|
+
How do I manage linked accounts?
|
|
23
|
+
Run "hs account link" to add accounts, "hs account unlink" to remove them, or "hs account list" to see what's linked.
|
|
24
|
+
|
|
25
|
+
Can I delete this file?
|
|
26
|
+
Yes. This README is for your reference only and can be safely deleted.
|
|
17
27
|
`;
|
|
18
28
|
export function getHsSettingsFilePath() {
|
|
19
29
|
return findupSync([`${HS_FOLDER}/${HS_SETTINGS_FILENAME}`], {
|
package/lib/gitignore.js
CHANGED
|
@@ -26,8 +26,8 @@ export function checkAndAddConfigToGitignore(configPath) {
|
|
|
26
26
|
export function checkAndAddHsFolderToGitignore(settingsPath) {
|
|
27
27
|
try {
|
|
28
28
|
const hsDirPath = path.resolve(path.dirname(settingsPath));
|
|
29
|
-
const { configIgnored, gitignoreFiles } = checkGitInclusion(hsDirPath);
|
|
30
|
-
if (configIgnored)
|
|
29
|
+
const { inGit, configIgnored, gitignoreFiles } = checkGitInclusion(hsDirPath);
|
|
30
|
+
if (!inGit || configIgnored)
|
|
31
31
|
return;
|
|
32
32
|
let gitignoreFilePath = gitignoreFiles && gitignoreFiles.length ? gitignoreFiles[0] : null;
|
|
33
33
|
if (!gitignoreFilePath) {
|
package/package.json
CHANGED
|
@@ -34,6 +34,7 @@ export type DeveloperTestAccountConfig = {
|
|
|
34
34
|
serviceLevel?: AccountLevel;
|
|
35
35
|
salesLevel?: AccountLevel;
|
|
36
36
|
contentLevel?: AccountLevel;
|
|
37
|
+
commerceLevel?: AccountLevel;
|
|
37
38
|
};
|
|
38
39
|
export type InstallOauthAppIntoDeveloperTestAccountResponse = {
|
|
39
40
|
authCodes: Array<{
|