@hubspot/cli 6.2.2-experimental.0 → 6.2.2-experimental.1

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.
Files changed (331) hide show
  1. package/LICENSE +12 -0
  2. package/README.md +71 -0
  3. package/commands/accounts/clean.d.ts +1 -4
  4. package/commands/accounts/clean.js +2 -0
  5. package/commands/accounts/info.d.ts +1 -4
  6. package/commands/accounts/info.js +3 -1
  7. package/commands/accounts/list.d.ts +1 -4
  8. package/commands/accounts/list.js +2 -0
  9. package/commands/accounts/remove.d.ts +1 -4
  10. package/commands/accounts/remove.js +2 -0
  11. package/commands/accounts/rename.d.ts +1 -4
  12. package/commands/accounts/rename.js +2 -0
  13. package/commands/accounts/use.d.ts +1 -4
  14. package/commands/accounts/use.js +2 -0
  15. package/commands/accounts.d.ts +1 -3
  16. package/commands/accounts.js +2 -0
  17. package/commands/auth.d.ts +1 -4
  18. package/commands/auth.js +2 -0
  19. package/commands/cms/convertFields.d.ts +1 -4
  20. package/commands/cms/convertFields.js +2 -0
  21. package/commands/cms/lighthouseScore.d.ts +1 -4
  22. package/commands/cms/lighthouseScore.js +2 -0
  23. package/commands/cms/reactModules.d.ts +1 -4
  24. package/commands/cms/reactModules.js +2 -0
  25. package/commands/cms.d.ts +1 -3
  26. package/commands/cms.js +2 -0
  27. package/commands/config/set.d.ts +1 -4
  28. package/commands/config/set.js +3 -3
  29. package/commands/config.d.ts +1 -3
  30. package/commands/config.js +2 -0
  31. package/commands/create/api-sample.d.ts +1 -13
  32. package/commands/create/api-sample.js +2 -0
  33. package/commands/create/app.d.ts +1 -10
  34. package/commands/create/app.js +2 -0
  35. package/commands/create/function.d.ts +1 -6
  36. package/commands/create/function.js +2 -0
  37. package/commands/create/index.d.ts +1 -109
  38. package/commands/create/index.js +2 -0
  39. package/commands/create/module.d.ts +1 -11
  40. package/commands/create/module.js +2 -0
  41. package/commands/create/react-app.d.ts +1 -9
  42. package/commands/create/react-app.js +2 -0
  43. package/commands/create/template.d.ts +1 -12
  44. package/commands/create/template.js +2 -0
  45. package/commands/create/vue-app.d.ts +1 -9
  46. package/commands/create/vue-app.js +2 -0
  47. package/commands/create/webpack-serverless.d.ts +1 -9
  48. package/commands/create/webpack-serverless.js +2 -0
  49. package/commands/create/website-theme.d.ts +1 -9
  50. package/commands/create/website-theme.js +2 -0
  51. package/commands/create.d.ts +24 -4
  52. package/commands/create.js +4 -1
  53. package/commands/customObject/create.d.ts +1 -4
  54. package/commands/customObject/create.js +2 -0
  55. package/commands/customObject/schema/create.d.ts +1 -4
  56. package/commands/customObject/schema/create.js +2 -0
  57. package/commands/customObject/schema/delete.d.ts +1 -4
  58. package/commands/customObject/schema/delete.js +3 -1
  59. package/commands/customObject/schema/fetch-all.d.ts +1 -4
  60. package/commands/customObject/schema/fetch-all.js +2 -0
  61. package/commands/customObject/schema/fetch.d.ts +1 -4
  62. package/commands/customObject/schema/fetch.js +3 -1
  63. package/commands/customObject/schema/list.d.ts +1 -3
  64. package/commands/customObject/schema/list.js +2 -0
  65. package/commands/customObject/schema/update.d.ts +1 -4
  66. package/commands/customObject/schema/update.js +2 -0
  67. package/commands/customObject/schema.d.ts +1 -3
  68. package/commands/customObject/schema.js +2 -0
  69. package/commands/customObject.d.ts +1 -3
  70. package/commands/customObject.js +2 -0
  71. package/commands/feedback.d.ts +1 -4
  72. package/commands/feedback.js +2 -0
  73. package/commands/fetch.d.ts +1 -4
  74. package/commands/fetch.js +2 -0
  75. package/commands/filemanager/fetch.d.ts +1 -4
  76. package/commands/filemanager/fetch.js +4 -2
  77. package/commands/filemanager/upload.d.ts +1 -4
  78. package/commands/filemanager/upload.js +2 -0
  79. package/commands/filemanager.d.ts +1 -3
  80. package/commands/filemanager.js +2 -0
  81. package/commands/functions/deploy.d.ts +1 -4
  82. package/commands/functions/deploy.js +2 -0
  83. package/commands/functions/list.d.ts +1 -4
  84. package/commands/functions/list.js +13 -2
  85. package/commands/functions/server.d.ts +1 -4
  86. package/commands/functions/server.js +2 -0
  87. package/commands/functions.d.ts +1 -3
  88. package/commands/functions.js +2 -0
  89. package/commands/hubdb/clear.d.ts +1 -4
  90. package/commands/hubdb/clear.js +2 -0
  91. package/commands/hubdb/create.d.ts +1 -4
  92. package/commands/hubdb/create.js +2 -0
  93. package/commands/hubdb/delete.d.ts +1 -4
  94. package/commands/hubdb/delete.js +2 -0
  95. package/commands/hubdb/fetch.d.ts +1 -4
  96. package/commands/hubdb/fetch.js +2 -0
  97. package/commands/hubdb.d.ts +1 -3
  98. package/commands/hubdb.js +2 -0
  99. package/commands/init.d.ts +1 -4
  100. package/commands/init.js +2 -0
  101. package/commands/lint.d.ts +1 -4
  102. package/commands/lint.js +2 -0
  103. package/commands/list.d.ts +1 -4
  104. package/commands/list.js +2 -0
  105. package/commands/logs.d.ts +1 -4
  106. package/commands/logs.js +2 -0
  107. package/commands/module/marketplace-validate.d.ts +1 -4
  108. package/commands/module/marketplace-validate.js +2 -0
  109. package/commands/module.d.ts +1 -3
  110. package/commands/module.js +2 -0
  111. package/commands/mv.d.ts +1 -4
  112. package/commands/mv.js +2 -0
  113. package/commands/open.d.ts +1 -4
  114. package/commands/open.js +2 -0
  115. package/commands/project/add.d.ts +1 -4
  116. package/commands/project/add.js +2 -0
  117. package/commands/project/cloneApp.d.ts +1 -4
  118. package/commands/project/cloneApp.js +2 -0
  119. package/commands/project/create.d.ts +1 -4
  120. package/commands/project/create.js +2 -0
  121. package/commands/project/deploy.d.ts +1 -4
  122. package/commands/project/deploy.js +2 -0
  123. package/commands/project/dev.d.ts +1 -4
  124. package/commands/project/dev.js +3 -0
  125. package/commands/project/download.d.ts +1 -4
  126. package/commands/project/download.js +4 -2
  127. package/commands/project/installDeps.d.ts +1 -6
  128. package/commands/project/installDeps.js +2 -0
  129. package/commands/project/listBuilds.d.ts +1 -4
  130. package/commands/project/listBuilds.js +2 -0
  131. package/commands/project/logs.d.ts +1 -4
  132. package/commands/project/logs.js +2 -0
  133. package/commands/project/migrateApp.d.ts +1 -4
  134. package/commands/project/migrateApp.js +2 -0
  135. package/commands/project/open.d.ts +1 -4
  136. package/commands/project/open.js +2 -0
  137. package/commands/project/upload.d.ts +1 -4
  138. package/commands/project/upload.js +2 -0
  139. package/commands/project/watch.d.ts +1 -4
  140. package/commands/project/watch.js +2 -0
  141. package/commands/project.d.ts +1 -3
  142. package/commands/project.js +2 -0
  143. package/commands/remove.d.ts +1 -4
  144. package/commands/remove.js +2 -0
  145. package/commands/sandbox/create.d.ts +1 -4
  146. package/commands/sandbox/create.js +2 -0
  147. package/commands/sandbox/delete.d.ts +1 -4
  148. package/commands/sandbox/delete.js +2 -0
  149. package/commands/sandbox.d.ts +1 -3
  150. package/commands/sandbox.js +2 -0
  151. package/commands/secrets/addSecret.d.ts +1 -4
  152. package/commands/secrets/addSecret.js +2 -0
  153. package/commands/secrets/deleteSecret.d.ts +1 -4
  154. package/commands/secrets/deleteSecret.js +2 -0
  155. package/commands/secrets/listSecrets.d.ts +1 -4
  156. package/commands/secrets/listSecrets.js +2 -0
  157. package/commands/secrets/updateSecret.d.ts +1 -4
  158. package/commands/secrets/updateSecret.js +2 -0
  159. package/commands/secrets.d.ts +1 -3
  160. package/commands/secrets.js +2 -0
  161. package/commands/theme/generate-selectors.d.ts +1 -4
  162. package/commands/theme/generate-selectors.js +2 -0
  163. package/commands/theme/marketplace-validate.d.ts +1 -4
  164. package/commands/theme/marketplace-validate.js +2 -0
  165. package/commands/theme/preview.d.ts +1 -4
  166. package/commands/theme/preview.js +56 -46
  167. package/commands/theme.d.ts +1 -3
  168. package/commands/theme.js +2 -0
  169. package/commands/upload.d.ts +1 -4
  170. package/commands/upload.js +2 -0
  171. package/commands/watch.d.ts +1 -4
  172. package/commands/watch.js +2 -0
  173. package/lib/DevServerManager.d.ts +1 -35
  174. package/lib/DevServerManager.js +2 -0
  175. package/lib/LocalDevManager.d.ts +1 -41
  176. package/lib/LocalDevManager.js +3 -1
  177. package/lib/accountTypes.d.ts +7 -6
  178. package/lib/accountTypes.js +31 -17
  179. package/lib/buildAccount.d.ts +1 -22
  180. package/lib/buildAccount.js +2 -0
  181. package/lib/commonOpts.d.ts +1 -20
  182. package/lib/commonOpts.js +2 -0
  183. package/lib/configOptions.d.ts +1 -0
  184. package/lib/configOptions.js +110 -0
  185. package/lib/constants.d.ts +84 -83
  186. package/lib/constants.js +23 -40
  187. package/lib/debugInfo.d.ts +1 -3
  188. package/lib/debugInfo.js +2 -0
  189. package/lib/dependencyManagement.d.ts +1 -7
  190. package/lib/dependencyManagement.js +2 -0
  191. package/lib/developerTestAccounts.d.ts +1 -7
  192. package/lib/developerTestAccounts.js +2 -0
  193. package/lib/enums/exitCodes.d.ts +5 -5
  194. package/lib/enums/exitCodes.js +3 -2
  195. package/lib/environment.d.ts +1 -1
  196. package/lib/environment.js +4 -5
  197. package/lib/errorHandlers/index.d.ts +1 -19
  198. package/lib/errorHandlers/index.js +2 -0
  199. package/lib/errorHandlers/suppressError.d.ts +1 -1
  200. package/lib/errorHandlers/suppressError.js +2 -0
  201. package/lib/filesystem.d.ts +2 -2
  202. package/lib/filesystem.js +12 -10
  203. package/lib/generate-selectors.d.ts +1 -6
  204. package/lib/generate-selectors.js +3 -1
  205. package/lib/hasFeature.d.ts +1 -1
  206. package/lib/hasFeature.js +7 -8
  207. package/lib/hasFlag.d.ts +1 -2
  208. package/lib/hasFlag.js +7 -3
  209. package/lib/hublValidate.d.ts +2 -4
  210. package/lib/hublValidate.js +13 -9
  211. package/lib/interpolation.d.ts +1 -10
  212. package/lib/interpolation.js +2 -0
  213. package/lib/interpolationHelpers.d.ts +10 -6
  214. package/lib/interpolationHelpers.js +29 -21
  215. package/lib/lang.d.ts +1 -3
  216. package/lib/lang.js +2 -0
  217. package/lib/links.d.ts +1 -127
  218. package/lib/links.js +2 -0
  219. package/lib/localDev.d.ts +1 -11
  220. package/lib/localDev.js +2 -0
  221. package/lib/marketplace-validate.d.ts +1 -5
  222. package/lib/marketplace-validate.js +2 -0
  223. package/lib/oauth.d.ts +1 -1
  224. package/lib/oauth.js +3 -1
  225. package/lib/polling.d.ts +1 -1
  226. package/lib/polling.js +2 -0
  227. package/lib/process.d.ts +1 -2
  228. package/lib/process.js +2 -0
  229. package/lib/projectLogsManager.d.ts +1 -19
  230. package/lib/projectLogsManager.js +2 -0
  231. package/lib/projectStructure.d.ts +1 -13
  232. package/lib/projectStructure.js +4 -2
  233. package/lib/projects.d.ts +1 -40
  234. package/lib/projects.js +10 -5
  235. package/lib/projectsWatch.d.ts +1 -1
  236. package/lib/projectsWatch.js +8 -3
  237. package/lib/prompts/accountNamePrompt.d.ts +1 -11
  238. package/lib/prompts/accountNamePrompt.js +2 -0
  239. package/lib/prompts/accountsPrompt.d.ts +1 -3
  240. package/lib/prompts/accountsPrompt.js +2 -0
  241. package/lib/prompts/activeInstallConfirmationPrompt.d.ts +1 -1
  242. package/lib/prompts/activeInstallConfirmationPrompt.js +2 -0
  243. package/lib/prompts/cleanUploadPrompt.d.ts +1 -1
  244. package/lib/prompts/cleanUploadPrompt.js +2 -0
  245. package/lib/prompts/cmsFieldPrompt.d.ts +1 -1
  246. package/lib/prompts/cmsFieldPrompt.js +2 -0
  247. package/lib/prompts/createApiSamplePrompt.d.ts +1 -1
  248. package/lib/prompts/createApiSamplePrompt.js +2 -0
  249. package/lib/prompts/createFunctionPrompt.d.ts +1 -1
  250. package/lib/prompts/createFunctionPrompt.js +2 -0
  251. package/lib/prompts/createModulePrompt.d.ts +1 -1
  252. package/lib/prompts/createModulePrompt.js +2 -0
  253. package/lib/prompts/createProjectPrompt.d.ts +1 -1
  254. package/lib/prompts/createProjectPrompt.js +10 -5
  255. package/lib/prompts/createTemplatePrompt.d.ts +1 -1
  256. package/lib/prompts/createTemplatePrompt.js +2 -0
  257. package/lib/prompts/deployBuildIdPrompt.d.ts +1 -1
  258. package/lib/prompts/deployBuildIdPrompt.js +2 -0
  259. package/lib/prompts/downloadProjectPrompt.d.ts +1 -1
  260. package/lib/prompts/downloadProjectPrompt.js +3 -1
  261. package/lib/prompts/feedbackPrompt.d.ts +1 -2
  262. package/lib/prompts/feedbackPrompt.js +2 -0
  263. package/lib/prompts/folderOverwritePrompt.d.ts +1 -1
  264. package/lib/prompts/folderOverwritePrompt.js +2 -0
  265. package/lib/prompts/installPublicAppPrompt.d.ts +1 -1
  266. package/lib/prompts/installPublicAppPrompt.js +2 -0
  267. package/lib/prompts/personalAccessKeyPrompt.d.ts +1 -69
  268. package/lib/prompts/personalAccessKeyPrompt.js +2 -0
  269. package/lib/prompts/previewPrompt.d.ts +1 -2
  270. package/lib/prompts/previewPrompt.js +2 -0
  271. package/lib/prompts/projectAddPrompt.d.ts +1 -1
  272. package/lib/prompts/projectAddPrompt.js +2 -0
  273. package/lib/prompts/projectDevTargetAccountPrompt.d.ts +1 -4
  274. package/lib/prompts/projectDevTargetAccountPrompt.js +2 -0
  275. package/lib/prompts/projectNamePrompt.d.ts +1 -1
  276. package/lib/prompts/projectNamePrompt.js +2 -0
  277. package/lib/prompts/projectsLogsPrompt.d.ts +1 -5
  278. package/lib/prompts/projectsLogsPrompt.js +2 -0
  279. package/lib/prompts/promptUtils.d.ts +1 -2
  280. package/lib/prompts/promptUtils.js +2 -0
  281. package/lib/prompts/sandboxesPrompt.d.ts +1 -2
  282. package/lib/prompts/sandboxesPrompt.js +2 -0
  283. package/lib/prompts/secretPrompt.d.ts +1 -1
  284. package/lib/prompts/secretPrompt.js +2 -0
  285. package/lib/prompts/selectPublicAppPrompt.d.ts +1 -5
  286. package/lib/prompts/selectPublicAppPrompt.js +3 -1
  287. package/lib/prompts/setAsDefaultAccountPrompt.d.ts +1 -1
  288. package/lib/prompts/setAsDefaultAccountPrompt.js +2 -0
  289. package/lib/prompts/uploadPrompt.d.ts +1 -1
  290. package/lib/prompts/uploadPrompt.js +2 -0
  291. package/lib/regex.d.ts +1 -1
  292. package/lib/regex.js +3 -4
  293. package/lib/sandboxSync.d.ts +1 -8
  294. package/lib/sandboxSync.js +3 -1
  295. package/lib/sandboxes.d.ts +1 -40
  296. package/lib/sandboxes.js +2 -0
  297. package/lib/schema.d.ts +3 -2
  298. package/lib/schema.js +20 -18
  299. package/lib/serverlessLogs.d.ts +1 -8
  300. package/lib/serverlessLogs.js +3 -1
  301. package/lib/ui/SpinniesManager.d.ts +1 -61
  302. package/lib/ui/SpinniesManager.js +2 -0
  303. package/lib/ui/git.d.ts +1 -1
  304. package/lib/ui/git.js +2 -0
  305. package/lib/ui/index.d.ts +1 -36
  306. package/lib/ui/index.js +2 -0
  307. package/lib/ui/serverlessFunctionLogs.d.ts +1 -1
  308. package/lib/ui/serverlessFunctionLogs.js +2 -0
  309. package/lib/ui/spinniesUtils.d.ts +1 -60
  310. package/lib/ui/spinniesUtils.js +2 -0
  311. package/lib/ui/supportHyperlinks.d.ts +1 -3
  312. package/lib/ui/supportHyperlinks.js +3 -1
  313. package/lib/ui/supportsColor.d.ts +1 -13
  314. package/lib/ui/supportsColor.js +3 -1
  315. package/lib/ui/table.d.ts +1 -2
  316. package/lib/ui/table.js +2 -0
  317. package/lib/upload.d.ts +1 -1
  318. package/lib/upload.js +4 -2
  319. package/lib/usageTracking.d.ts +1 -6
  320. package/lib/usageTracking.js +2 -0
  321. package/lib/validation.d.ts +1 -16
  322. package/lib/validation.js +2 -0
  323. package/package.json +15 -9
  324. package/commands/config/set/allowUsageTracking.d.ts +0 -4
  325. package/commands/config/set/allowUsageTracking.js +0 -45
  326. package/commands/config/set/defaultMode.d.ts +0 -4
  327. package/commands/config/set/defaultMode.js +0 -48
  328. package/commands/config/set/httpTimeout.d.ts +0 -4
  329. package/commands/config/set/httpTimeout.js +0 -33
  330. package/lib/getFunctionArrays.d.ts +0 -1
  331. package/lib/getFunctionArrays.js +0 -17
@@ -1,5 +1,5 @@
1
- export namespace EXIT_CODES {
2
- let SUCCESS: number;
3
- let ERROR: number;
4
- let WARNING: number;
5
- }
1
+ export declare const EXIT_CODES: {
2
+ readonly SUCCESS: 0;
3
+ readonly ERROR: 1;
4
+ readonly WARNING: 2;
5
+ };
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EXIT_CODES = void 0;
2
4
  /*
3
5
  * 0: Successful run
4
6
  * 1: Config problem or internal error
5
7
  * 2: Warnings or validation issues
6
8
  */
7
- const EXIT_CODES = {
9
+ exports.EXIT_CODES = {
8
10
  SUCCESS: 0,
9
11
  ERROR: 1,
10
12
  WARNING: 2,
11
13
  };
12
- module.exports = { EXIT_CODES };
@@ -1 +1 @@
1
- export function getPlatform(): "aix" | "android" | "freebsd" | "haiku" | "linux" | "openbsd" | "sunos" | "cygwin" | "netbsd" | "macos" | "windows";
1
+ export declare function getPlatform(): string;
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
- const getPlatform = () => {
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPlatform = getPlatform;
4
+ function getPlatform() {
3
5
  switch (process.platform) {
4
6
  case 'darwin':
5
7
  return 'macos';
@@ -8,7 +10,4 @@ const getPlatform = () => {
8
10
  default:
9
11
  return process.platform;
10
12
  }
11
- };
12
- module.exports = {
13
- getPlatform,
14
- };
13
+ }
@@ -1,19 +1 @@
1
- export function logError(error: any, context?: {}): void;
2
- /**
3
- * Logs (debug) the error and context objects.
4
- *
5
- * @param {Error} error
6
- * @param {ApiErrorContext} context
7
- */
8
- export function debugError(error: Error, context?: ApiErrorContext): void;
9
- export class ApiErrorContext {
10
- constructor(props?: {});
11
- /** @type {number} */
12
- accountId: number;
13
- /** @type {string} */
14
- request: string;
15
- /** @type {string} */
16
- payload: string;
17
- /** @type {string} */
18
- projectName: string;
19
- }
1
+ export {};
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const { logger } = require('@hubspot/local-dev-lib/logger');
3
5
  const { isHubSpotHttpError, isSystemError, isFileSystemError, isValidationError, isMissingScopeError, } = require('@hubspot/local-dev-lib/errors/index');
4
6
  const { shouldSuppressError } = require('./suppressError');
@@ -1 +1 @@
1
- export function shouldSuppressError(err: any, context?: {}): boolean;
1
+ export {};
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const { isSpecifiedError, isMissingScopeError, } = require('@hubspot/local-dev-lib/errors/index');
3
5
  const { logger } = require('@hubspot/local-dev-lib/logger');
4
6
  const { PLATFORM_VERSION_ERROR_TYPES } = require('../constants');
@@ -1,2 +1,2 @@
1
- export function resolveLocalPath(filepath: any): string;
2
- export function isPathFolder(path: any): boolean;
1
+ export declare function resolveLocalPath(filepath: string): string;
2
+ export declare function isPathFolder(path: string): boolean;
package/lib/filesystem.js CHANGED
@@ -1,24 +1,26 @@
1
1
  "use strict";
2
- const path = require('path');
3
- const { getCwd } = require('@hubspot/local-dev-lib/path');
4
- const { FOLDER_DOT_EXTENSIONS, } = require('@hubspot/local-dev-lib/constants/extensions');
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.resolveLocalPath = resolveLocalPath;
7
+ exports.isPathFolder = isPathFolder;
8
+ const path_1 = __importDefault(require("path"));
9
+ const path_2 = require("@hubspot/local-dev-lib/path");
10
+ const extensions_1 = require("@hubspot/local-dev-lib/constants/extensions");
5
11
  function resolveLocalPath(filepath) {
6
12
  return filepath && typeof filepath === 'string'
7
- ? path.resolve(getCwd(), filepath)
13
+ ? path_1.default.resolve((0, path_2.getCwd)(), filepath)
8
14
  : // Use CWD if optional filepath is not passed.
9
- getCwd();
15
+ (0, path_2.getCwd)();
10
16
  }
11
17
  function isPathFolder(path) {
12
18
  const splitPath = path.split('/');
13
19
  const fileOrFolderName = splitPath[splitPath.length - 1];
14
20
  const splitName = fileOrFolderName.split('.');
15
21
  if (splitName.length > 1 &&
16
- FOLDER_DOT_EXTENSIONS.indexOf(splitName[1]) === -1) {
22
+ extensions_1.FOLDER_DOT_EXTENSIONS.indexOf(splitName[1]) === -1) {
17
23
  return false;
18
24
  }
19
25
  return true;
20
26
  }
21
- module.exports = {
22
- resolveLocalPath,
23
- isPathFolder,
24
- };
@@ -1,6 +1 @@
1
- export function findFieldsJsonPath(basePath: any): any;
2
- export function combineThemeCss(basePath: any, cssString?: string): any;
3
- export function setPreviewSelectors(fields: any, fieldPath: any, selectors: any, depth?: number): any;
4
- export function generateInheritedSelectors(fields: any): any[];
5
- export function generateSelectorsMap(fields: any, fieldKey?: any[]): {};
6
- export function getMaxFieldsDepth(): number;
1
+ export {};
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const fs = require('fs');
3
5
  const { EXIT_CODES } = require('./enums/exitCodes');
4
6
  const { logger } = require('@hubspot/local-dev-lib/logger');
5
- const { i18n } = require('../lib/lang');
7
+ const { i18n } = require('./lang');
6
8
  const CSS_COMMENTS_REGEX = new RegExp(/\/\*.*\*\//, 'g');
7
9
  const CSS_PSEUDO_CLASS_REGEX = new RegExp(/:active|:checked|:disabled|:empty|:enabled|:first-of-type|:focus|:hover|:in-range|:invalid|:link|:optional|:out-of-range|:read-only|:read-write|:required|:target|:valid|:visited/, 'g');
8
10
  const i18nKey = 'commands.theme.subcommands.generateSelectors';
@@ -1 +1 @@
1
- export function hasFeature(accountId: any, feature: any): Promise<boolean>;
1
+ export declare function hasFeature(accountId: number, feature: string): Promise<boolean>;
package/lib/hasFeature.js CHANGED
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
- const { fetchEnabledFeatures, } = require('@hubspot/local-dev-lib/api/localDevAuth');
3
- const hasFeature = async (accountId, feature) => {
4
- const { data: { enabledFeatures }, } = await fetchEnabledFeatures(accountId);
5
- return enabledFeatures[feature];
6
- };
7
- module.exports = {
8
- hasFeature,
9
- };
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hasFeature = hasFeature;
4
+ const localDevAuth_1 = require("@hubspot/local-dev-lib/api/localDevAuth");
5
+ async function hasFeature(accountId, feature) {
6
+ const { data: { enabledFeatures }, } = await (0, localDevAuth_1.fetchEnabledFeatures)(accountId);
7
+ return Boolean(enabledFeatures[feature]);
8
+ }
package/lib/hasFlag.d.ts CHANGED
@@ -1,2 +1 @@
1
- export = hasFlag;
2
- declare function hasFlag(flag: any, argv?: string[]): boolean;
1
+ export declare function hasFlag(flag: string, argv?: string[]): boolean;
package/lib/hasFlag.js CHANGED
@@ -1,11 +1,15 @@
1
1
  "use strict";
2
- const process = require('process');
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.hasFlag = hasFlag;
7
+ const process_1 = __importDefault(require("process"));
3
8
  // See https://github.com/sindresorhus/has-flag/blob/main/index.js (License: https://github.com/sindresorhus/has-flag/blob/main/license)
4
- function hasFlag(flag, argv = process.argv) {
9
+ function hasFlag(flag, argv = process_1.default.argv) {
5
10
  const prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
6
11
  const position = argv.indexOf(prefix + flag);
7
12
  const terminatorPosition = argv.indexOf('--');
8
13
  return (position !== -1 &&
9
14
  (terminatorPosition === -1 || position < terminatorPosition));
10
15
  }
11
- module.exports = hasFlag;
@@ -1,4 +1,2 @@
1
- export function printHublValidationResult({ file, validation }: {
2
- file: any;
3
- validation: any;
4
- }): number;
1
+ import { LintResult } from '@hubspot/local-dev-lib/types/HublValidation';
2
+ export declare function printHublValidationResult({ file, validation, }: LintResult): number;
@@ -1,18 +1,25 @@
1
1
  "use strict";
2
- const { logger } = require('@hubspot/local-dev-lib/logger');
3
- const getErrorsFromHublValidationObject = validation => (validation && validation.meta && validation.meta.template_errors) || [];
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.printHublValidationResult = printHublValidationResult;
4
+ const logger_1 = require("@hubspot/local-dev-lib/logger");
5
+ function getErrorsFromHublValidationObject(validation) {
6
+ return ((validation && validation.meta && validation.meta.template_errors) || []);
7
+ }
4
8
  function printHublValidationError(err) {
5
9
  const { severity, message, lineno, startPosition } = err;
6
10
  const method = severity === 'FATAL' ? 'error' : 'warn';
7
- logger[method]('[%d, %d]: %s', lineno, startPosition, message);
11
+ logger_1.logger[method]('[%d, %d]: %s', lineno, startPosition, message);
8
12
  }
9
- function printHublValidationResult({ file, validation }) {
13
+ function printHublValidationResult({ file, validation, }) {
10
14
  let count = 0;
15
+ if (!validation) {
16
+ return count;
17
+ }
11
18
  const errors = getErrorsFromHublValidationObject(validation);
12
19
  if (!errors.length) {
13
20
  return count;
14
21
  }
15
- logger.group(file);
22
+ logger_1.logger.group(file);
16
23
  errors.forEach(err => {
17
24
  if (err.reason !== 'SYNTAX_ERROR') {
18
25
  return;
@@ -20,9 +27,6 @@ function printHublValidationResult({ file, validation }) {
20
27
  ++count;
21
28
  printHublValidationError(err);
22
29
  });
23
- logger.groupEnd(file);
30
+ logger_1.logger.groupEnd();
24
31
  return count;
25
32
  }
26
- module.exports = {
27
- printHublValidationResult,
28
- };
@@ -1,10 +1 @@
1
- /**
2
- * Interpolate a string with data and compile helpers on the string
3
- * @param {string} stringValue - The string to interpolate
4
- * @param {object} interpolationData - The data to interpolate with
5
- * @returns {string} - The interpolated and helper-compiled string
6
- * @example
7
- * interpolateAndCompile('Some {{#bold}}{{text}}{{/bold}} text', { text: 'awesomely bold' })
8
- * // 'Some awsomely bold text' (with the words 'awesomely bold' in bold)
9
- */
10
- export function interpolate(stringValue: string, interpolationData: object): string;
1
+ export {};
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const helpers = require('./interpolationHelpers');
3
5
  const delimiters = {
4
6
  interpolation: {
@@ -1,6 +1,10 @@
1
- export function bold(stringValue: any): string;
2
- export function yellow(stringValue: any): string;
3
- export function green(stringValue: any): string;
4
- export function red(stringValue: any): string;
5
- export function cyan(stringValue: any): string;
6
- export function orange(stringValue: any): string;
1
+ /**
2
+ * These helper methods are used to modify text output within the CLI. They
3
+ * should all take in a string value and output a modified string value.
4
+ */
5
+ export declare function bold(stringValue: string): string;
6
+ export declare function yellow(stringValue: string): string;
7
+ export declare function green(stringValue: string): string;
8
+ export declare function red(stringValue: string): string;
9
+ export declare function cyan(stringValue: string): string;
10
+ export declare function orange(stringValue: string): string;
@@ -1,26 +1,34 @@
1
1
  "use strict";
2
- const chalk = require('chalk');
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.bold = bold;
7
+ exports.yellow = yellow;
8
+ exports.green = green;
9
+ exports.red = red;
10
+ exports.cyan = cyan;
11
+ exports.orange = orange;
12
+ const chalk_1 = __importDefault(require("chalk"));
3
13
  /**
4
14
  * These helper methods are used to modify text output within the CLI. They
5
15
  * should all take in a string value and output a modified string value.
6
16
  */
7
- module.exports = {
8
- bold: function (stringValue) {
9
- return chalk.bold(stringValue);
10
- },
11
- yellow: function (stringValue) {
12
- return chalk.reset.yellow(stringValue);
13
- },
14
- green: function (stringValue) {
15
- return chalk.reset.green(stringValue);
16
- },
17
- red: function (stringValue) {
18
- return chalk.reset.red(stringValue);
19
- },
20
- cyan: function (stringValue) {
21
- return chalk.cyan(stringValue);
22
- },
23
- orange: function (stringValue) {
24
- return chalk.hex('#FC9900')(stringValue);
25
- },
26
- };
17
+ function bold(stringValue) {
18
+ return chalk_1.default.bold(stringValue);
19
+ }
20
+ function yellow(stringValue) {
21
+ return chalk_1.default.reset.yellow(stringValue);
22
+ }
23
+ function green(stringValue) {
24
+ return chalk_1.default.reset.green(stringValue);
25
+ }
26
+ function red(stringValue) {
27
+ return chalk_1.default.reset.red(stringValue);
28
+ }
29
+ function cyan(stringValue) {
30
+ return chalk_1.default.cyan(stringValue);
31
+ }
32
+ function orange(stringValue) {
33
+ return chalk_1.default.hex('#FC9900')(stringValue);
34
+ }
package/lib/lang.d.ts CHANGED
@@ -1,3 +1 @@
1
- export function i18n(lookupDotNotation: any, options?: {}): any;
2
- export function setLangData(newLocale: any, newLangObj: any): void;
3
- export const MISSING_LANGUAGE_DATA_PREFIX: "[Missing language data]";
1
+ export {};
package/lib/lang.js CHANGED
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const util = require('util');
3
5
  const path = require('path');
4
6
  const fs = require('fs-extra');
package/lib/links.d.ts CHANGED
@@ -1,127 +1 @@
1
- export function getSiteLinks(accountId: any): {
2
- APPS_MARKETPLACE: {
3
- shortcut: string;
4
- alias: string;
5
- url: string;
6
- };
7
- ASSET_MARKETPLACE: {
8
- shortcut: string;
9
- alias: string;
10
- url: string;
11
- };
12
- CONTENT_STAGING: {
13
- shortcut: string;
14
- alias: string;
15
- url: string;
16
- };
17
- DESIGN_MANAGER: {
18
- shortcut: string;
19
- alias: string;
20
- url: string;
21
- };
22
- DOCS: {
23
- shortcut: string;
24
- url: string;
25
- };
26
- FILE_MANAGER: {
27
- shortcut: string;
28
- alias: string;
29
- url: string;
30
- };
31
- FORUMS: {
32
- shortcut: string;
33
- url: string;
34
- };
35
- HUBDB: {
36
- shortcut: string;
37
- alias: string;
38
- url: string;
39
- };
40
- SETTINGS: {
41
- shortcut: string;
42
- alias: string;
43
- url: string;
44
- };
45
- SETTINGS_NAVIGATION: {
46
- shortcut: string;
47
- alias: string;
48
- url: string;
49
- };
50
- SETTINGS_WEBSITE: {
51
- shortcut: string;
52
- alias: string;
53
- url: string;
54
- };
55
- SETTINGS_URL_REDIRECTS: {
56
- shortcut: string;
57
- alias: string;
58
- url: string;
59
- };
60
- PURCHASED_ASSETS: {
61
- shortcut: string;
62
- alias: string;
63
- url: string;
64
- };
65
- WEBSITE_PAGES: {
66
- shortcut: string;
67
- alias: string;
68
- url: string;
69
- };
70
- };
71
- export function getSiteLinksAsArray(accountId: any): ({
72
- shortcut: string;
73
- alias: string;
74
- url: string;
75
- } | {
76
- shortcut: string;
77
- alias: string;
78
- url: string;
79
- } | {
80
- shortcut: string;
81
- alias: string;
82
- url: string;
83
- } | {
84
- shortcut: string;
85
- alias: string;
86
- url: string;
87
- } | {
88
- shortcut: string;
89
- url: string;
90
- } | {
91
- shortcut: string;
92
- alias: string;
93
- url: string;
94
- } | {
95
- shortcut: string;
96
- url: string;
97
- } | {
98
- shortcut: string;
99
- alias: string;
100
- url: string;
101
- } | {
102
- shortcut: string;
103
- alias: string;
104
- url: string;
105
- } | {
106
- shortcut: string;
107
- alias: string;
108
- url: string;
109
- } | {
110
- shortcut: string;
111
- alias: string;
112
- url: string;
113
- } | {
114
- shortcut: string;
115
- alias: string;
116
- url: string;
117
- } | {
118
- shortcut: string;
119
- alias: string;
120
- url: string;
121
- } | {
122
- shortcut: string;
123
- alias: string;
124
- url: string;
125
- })[];
126
- export function logSiteLinks(accountId: any): void;
127
- export function openLink(accountId: any, shortcut: any): void;
1
+ export {};
package/lib/links.js CHANGED
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const { getEnv } = require('@hubspot/local-dev-lib/config');
3
5
  const { ENVIRONMENTS, } = require('@hubspot/local-dev-lib/constants/environments');
4
6
  const { getHubSpotWebsiteOrigin } = require('@hubspot/local-dev-lib/urls');
package/lib/localDev.d.ts CHANGED
@@ -1,11 +1 @@
1
- export function confirmDefaultAccountIsTarget(accountConfig: any): Promise<void>;
2
- export function checkIfDefaultAccountIsSupported(accountConfig: any, hasPublicApps: any): void;
3
- export function checkIfAccountFlagIsSupported(accountConfig: any, hasPublicApps: any): void;
4
- export function suggestRecommendedNestedAccount(accounts: any, accountConfig: any, hasPublicApps: any): Promise<any>;
5
- export function createSandboxForLocalDev(accountId: any, accountConfig: any, env: any): Promise<any>;
6
- export function createDeveloperTestAccountForLocalDev(accountId: any, accountConfig: any, env: any): Promise<any>;
7
- export function useExistingDevTestAccount(env: any, account: any): Promise<void>;
8
- export function createNewProjectForLocalDev(projectConfig: any, targetAccountId: any, shouldCreateWithoutConfirmation: any, hasPublicApps: any): Promise<import("@hubspot/local-dev-lib/types/Project").Project>;
9
- export function createInitialBuildForNewProject(projectConfig: any, projectDir: any, targetAccountId: any): Promise<any>;
10
- export function getAccountHomeUrl(accountId: any): string;
11
- export function checkIfParentAccountIsAuthed(accountConfig: any): void;
1
+ export {};
package/lib/localDev.js CHANGED
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const { logger } = require('@hubspot/local-dev-lib/logger');
3
5
  const { HUBSPOT_ACCOUNT_TYPES, HUBSPOT_ACCOUNT_TYPE_STRINGS, } = require('@hubspot/local-dev-lib/constants/config');
4
6
  const { isMissingScopeError, isSpecifiedError, } = require('@hubspot/local-dev-lib/errors/index');
@@ -1,5 +1 @@
1
- export function kickOffValidation(accountId: any, assetType: any, src: any): Promise<number>;
2
- export function pollForValidationFinish(accountId: any, validationId: any): Promise<void>;
3
- export function fetchValidationResults(accountId: any, validationId: any): Promise<import("@hubspot/local-dev-lib/types/MarketplaceValidation").GetValidationResultsResponse>;
4
- export function processValidationErrors(i18nKey: any, validationResults: any): void;
5
- export function displayValidationResults(i18nKey: any, validationResults: any): void;
1
+ export {};
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const chalk = require('chalk');
3
5
  const { logger } = require('@hubspot/local-dev-lib/logger');
4
6
  const { requestValidation, getValidationStatus, getValidationResults, } = require('@hubspot/local-dev-lib/api/marketplaceValidation');
package/lib/oauth.d.ts CHANGED
@@ -1 +1 @@
1
- export function authenticateWithOauth(configData: any): Promise<void>;
1
+ export {};
package/lib/oauth.js CHANGED
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const express = require('express');
3
5
  const open = require('open');
4
6
  const { OAuth2Manager, } = require('@hubspot/local-dev-lib/models/OAuth2Manager');
@@ -19,7 +21,7 @@ const buildAuthUrl = oauthManager => {
19
21
  };
20
22
  const handleServerOnProcessEnd = server => {
21
23
  const shutdownServerIfRunning = () => {
22
- server && server.close();
24
+ server?.close();
23
25
  };
24
26
  handleExit(shutdownServerIfRunning);
25
27
  };
package/lib/polling.d.ts CHANGED
@@ -1 +1 @@
1
- export function poll(callback: any, accountId: any, taskId: any): Promise<any>;
1
+ export {};
package/lib/polling.js CHANGED
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const { POLLING_DELAY, POLLING_STATUS } = require('./constants');
3
5
  const poll = (callback, accountId, taskId) => {
4
6
  return new Promise((resolve, reject) => {
package/lib/process.d.ts CHANGED
@@ -1,2 +1 @@
1
- export function handleExit(callback: any): void;
2
- export function handleKeypress(callback: any): void;
1
+ export {};
package/lib/process.js CHANGED
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const readline = require('readline');
3
5
  const { logger, setLogLevel, LOG_LEVEL, } = require('@hubspot/local-dev-lib/logger');
4
6
  const { i18n } = require('./lang');
@@ -1,19 +1 @@
1
- declare const _exports: ProjectLogsManager;
2
- export = _exports;
3
- declare class ProjectLogsManager {
4
- reset(): void;
5
- init(accountId: any): Promise<void>;
6
- projectName: any;
7
- accountId: any;
8
- functions: any[] | undefined;
9
- projectId: any;
10
- fetchFunctionDetails(): Promise<void>;
11
- getFunctionNames(): any[];
12
- setFunction(functionName: any): void;
13
- selectedFunction: any;
14
- functionName: any;
15
- appId: any;
16
- endpointName: any;
17
- method: any;
18
- isPublicFunction: boolean | undefined;
19
- }
1
+ export {};
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-nocheck
2
4
  const { getProjectConfig, ensureProjectExists } = require('./projects');
3
5
  const { fetchProjectComponentsMetadata, } = require('@hubspot/local-dev-lib/api/projects');
4
6
  const { i18n } = require('./lang');
@@ -1,13 +1 @@
1
- export const CONFIG_FILES: {
2
- "private-app": string;
3
- "public-app": string;
4
- "hubl-theme": string;
5
- };
6
- export const COMPONENT_TYPES: Readonly<{
7
- privateApp: "private-app";
8
- publicApp: "public-app";
9
- hublTheme: "hubl-theme";
10
- }>;
11
- export function findProjectComponents(projectSourceDir: any): Promise<any[]>;
12
- export function getAppCardConfigs(appConfig: any, appPath: any): any[];
13
- export function getProjectComponentTypes(components: any): {};
1
+ export {};