@hubspot/cli 7.7.21-experimental.0 → 7.7.21-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.
- package/api/__tests__/migrate.test.js +29 -27
- package/api/migrate.js +22 -14
- package/bin/cli.js +101 -92
- package/bin/hs +2 -2
- package/bin/hscms +2 -2
- package/bin/silenceErrors.js +2 -1
- package/commands/__tests__/account.test.js +34 -29
- package/commands/__tests__/auth.test.js +16 -11
- package/commands/__tests__/cms.test.js +20 -15
- package/commands/__tests__/config.test.js +19 -14
- package/commands/__tests__/create.test.js +15 -10
- package/commands/__tests__/customObject.test.js +19 -14
- package/commands/__tests__/doctor.test.js +48 -43
- package/commands/__tests__/feedback.test.js +45 -7
- package/commands/__tests__/fetch.test.js +28 -29
- package/commands/__tests__/filemanager.test.js +19 -14
- package/commands/__tests__/function.test.js +21 -16
- package/commands/__tests__/getStarted.test.js +50 -55
- package/commands/__tests__/hubdb.test.js +22 -17
- package/commands/__tests__/init.test.js +17 -12
- package/commands/__tests__/lint.test.js +18 -13
- package/commands/__tests__/list.test.js +23 -18
- package/commands/__tests__/logs.test.js +27 -28
- package/commands/__tests__/mcp.test.js +19 -14
- package/commands/__tests__/mv.test.js +52 -14
- package/commands/__tests__/open.test.js +51 -13
- package/commands/__tests__/project.test.js +49 -44
- package/commands/__tests__/remove.test.js +51 -13
- package/commands/__tests__/sandbox.test.js +19 -14
- package/commands/__tests__/secret.test.js +21 -16
- package/commands/__tests__/testAccount.test.js +21 -16
- package/commands/__tests__/theme.test.js +20 -15
- package/commands/account/__tests__/auth.test.js +16 -11
- package/commands/account/__tests__/clean.test.js +17 -12
- package/commands/account/__tests__/createOverride.test.js +15 -10
- package/commands/account/__tests__/info.test.js +16 -11
- package/commands/account/__tests__/list.test.js +16 -11
- package/commands/account/__tests__/remove.test.js +18 -13
- package/commands/account/__tests__/removeOverride.js +13 -8
- package/commands/account/__tests__/rename.test.js +20 -15
- package/commands/account/__tests__/use.test.js +15 -10
- package/commands/account/auth.d.ts +1 -1
- package/commands/account/auth.js +67 -65
- package/commands/account/clean.d.ts +1 -1
- package/commands/account/clean.js +60 -55
- package/commands/account/createOverride.d.ts +1 -1
- package/commands/account/createOverride.js +57 -52
- package/commands/account/info.d.ts +1 -1
- package/commands/account/info.js +35 -33
- package/commands/account/list.d.ts +1 -1
- package/commands/account/list.js +45 -43
- package/commands/account/remove.d.ts +1 -1
- package/commands/account/remove.js +42 -37
- package/commands/account/removeOverride.d.ts +1 -1
- package/commands/account/removeOverride.js +43 -38
- package/commands/account/rename.d.ts +1 -1
- package/commands/account/rename.js +20 -18
- package/commands/account/use.d.ts +1 -1
- package/commands/account/use.js +31 -29
- package/commands/account.d.ts +1 -1
- package/commands/account.js +28 -23
- package/commands/app/__tests__/install.test.js +52 -0
- package/commands/app/__tests__/migrate.test.js +34 -29
- package/commands/app/install.d.ts +8 -0
- package/commands/app/install.js +127 -0
- package/commands/app/migrate.d.ts +2 -2
- package/commands/app/migrate.js +43 -40
- package/commands/app/secret/__tests__/add.test.js +11 -6
- package/commands/app/secret/__tests__/delete.test.js +11 -6
- package/commands/app/secret/__tests__/list.test.js +11 -6
- package/commands/app/secret/__tests__/update.test.js +11 -6
- package/commands/app/secret/add.d.ts +1 -1
- package/commands/app/secret/add.js +30 -28
- package/commands/app/secret/delete.d.ts +1 -1
- package/commands/app/secret/delete.js +36 -34
- package/commands/app/secret/list.d.ts +1 -1
- package/commands/app/secret/list.js +27 -25
- package/commands/app/secret/update.d.ts +1 -1
- package/commands/app/secret/update.js +34 -32
- package/commands/app/secret.d.ts +1 -1
- package/commands/app/secret.js +17 -12
- package/commands/app.d.ts +1 -1
- package/commands/app.js +16 -6
- package/commands/auth.d.ts +1 -1
- package/commands/auth.js +72 -70
- package/commands/cms/convertFields.d.ts +1 -1
- package/commands/cms/convertFields.js +39 -34
- package/commands/cms/getReactModule.d.ts +1 -1
- package/commands/cms/getReactModule.js +37 -32
- package/commands/cms/lighthouseScore.d.ts +1 -1
- package/commands/cms/lighthouseScore.js +72 -67
- package/commands/cms.d.ts +1 -1
- package/commands/cms.js +16 -11
- package/commands/completion.d.ts +1 -1
- package/commands/completion.js +15 -10
- package/commands/config/migrate.d.ts +1 -1
- package/commands/config/migrate.js +32 -27
- package/commands/config/set.d.ts +1 -1
- package/commands/config/set.js +25 -23
- package/commands/config.d.ts +1 -1
- package/commands/config.js +13 -8
- package/commands/create/api-sample.d.ts +1 -1
- package/commands/create/api-sample.js +33 -28
- package/commands/create/app.d.ts +1 -1
- package/commands/create/app.js +5 -3
- package/commands/create/function.d.ts +1 -1
- package/commands/create/function.js +11 -9
- package/commands/create/index.d.ts +1 -1
- package/commands/create/index.js +24 -19
- package/commands/create/module.d.ts +1 -1
- package/commands/create/module.js +14 -12
- package/commands/create/react-app.d.ts +1 -1
- package/commands/create/react-app.js +5 -3
- package/commands/create/template.d.ts +1 -1
- package/commands/create/template.js +14 -12
- package/commands/create/vue-app.d.ts +1 -1
- package/commands/create/vue-app.js +5 -3
- package/commands/create/webpack-serverless.d.ts +1 -1
- package/commands/create/webpack-serverless.js +5 -3
- package/commands/create/website-theme.d.ts +1 -1
- package/commands/create/website-theme.js +7 -5
- package/commands/create.d.ts +2 -2
- package/commands/create.js +35 -30
- package/commands/customObject/__tests__/create.test.js +18 -13
- package/commands/customObject/__tests__/schema.test.js +23 -18
- package/commands/customObject/create.d.ts +1 -1
- package/commands/customObject/create.js +30 -28
- package/commands/customObject/schema/__tests__/create.test.js +18 -13
- package/commands/customObject/schema/__tests__/delete.test.js +18 -13
- package/commands/customObject/schema/__tests__/fetch-all.test.js +18 -13
- package/commands/customObject/schema/__tests__/fetch.test.js +18 -13
- package/commands/customObject/schema/__tests__/list.test.js +18 -13
- package/commands/customObject/schema/__tests__/update.test.js +18 -13
- package/commands/customObject/schema/create.d.ts +1 -1
- package/commands/customObject/schema/create.js +30 -28
- package/commands/customObject/schema/delete.d.ts +1 -1
- package/commands/customObject/schema/delete.js +26 -24
- package/commands/customObject/schema/fetch-all.d.ts +1 -1
- package/commands/customObject/schema/fetch-all.js +24 -22
- package/commands/customObject/schema/fetch.d.ts +1 -1
- package/commands/customObject/schema/fetch.js +26 -24
- package/commands/customObject/schema/list.d.ts +1 -1
- package/commands/customObject/schema/list.js +15 -13
- package/commands/customObject/schema/update.d.ts +1 -1
- package/commands/customObject/schema/update.js +34 -32
- package/commands/customObject/schema.d.ts +1 -1
- package/commands/customObject/schema.js +22 -17
- package/commands/customObject.d.ts +1 -1
- package/commands/customObject.js +18 -13
- package/commands/doctor.d.ts +1 -1
- package/commands/doctor.js +33 -28
- package/commands/feedback.d.ts +1 -1
- package/commands/feedback.js +24 -19
- package/commands/fetch.d.ts +1 -1
- package/commands/fetch.js +30 -28
- package/commands/filemanager/__tests__/fetch.test.js +22 -17
- package/commands/filemanager/__tests__/upload.test.js +20 -15
- package/commands/filemanager/fetch.d.ts +1 -1
- package/commands/filemanager/fetch.js +25 -23
- package/commands/filemanager/upload.d.ts +1 -1
- package/commands/filemanager/upload.js +44 -39
- package/commands/filemanager.d.ts +1 -1
- package/commands/filemanager.js +13 -8
- package/commands/function/deploy.d.ts +1 -1
- package/commands/function/deploy.js +40 -35
- package/commands/function/list.d.ts +1 -1
- package/commands/function/list.js +29 -24
- package/commands/function/server.d.ts +1 -1
- package/commands/function/server.js +17 -15
- package/commands/function.d.ts +1 -1
- package/commands/function.js +18 -12
- package/commands/getStarted.d.ts +1 -1
- package/commands/getStarted.js +131 -140
- package/commands/hubdb/__tests__/clear.test.js +18 -13
- package/commands/hubdb/__tests__/create.test.js +18 -13
- package/commands/hubdb/__tests__/delete.test.js +18 -13
- package/commands/hubdb/__tests__/fetch.test.js +18 -13
- package/commands/hubdb/__tests__/list.test.js +28 -23
- package/commands/hubdb/clear.d.ts +1 -1
- package/commands/hubdb/clear.js +22 -20
- package/commands/hubdb/create.d.ts +1 -1
- package/commands/hubdb/create.js +35 -30
- package/commands/hubdb/delete.d.ts +1 -1
- package/commands/hubdb/delete.js +26 -24
- package/commands/hubdb/fetch.d.ts +1 -1
- package/commands/hubdb/fetch.js +19 -17
- package/commands/hubdb/list.d.ts +1 -1
- package/commands/hubdb/list.js +35 -33
- package/commands/hubdb.d.ts +1 -1
- package/commands/hubdb.js +24 -18
- package/commands/init.d.ts +1 -1
- package/commands/init.js +88 -83
- package/commands/lint.d.ts +1 -1
- package/commands/lint.js +26 -24
- package/commands/list.d.ts +1 -1
- package/commands/list.js +37 -32
- package/commands/logs.d.ts +1 -1
- package/commands/logs.js +37 -35
- package/commands/mcp/__tests__/setup.test.js +12 -7
- package/commands/mcp/__tests__/start.test.js +12 -7
- package/commands/mcp/setup.d.ts +1 -1
- package/commands/mcp/setup.js +20 -17
- package/commands/mcp/start.d.ts +5 -2
- package/commands/mcp/start.js +41 -31
- package/commands/mcp.d.ts +1 -1
- package/commands/mcp.js +12 -7
- package/commands/module/marketplace-validate.d.ts +1 -1
- package/commands/module/marketplace-validate.js +26 -21
- package/commands/module.d.ts +1 -1
- package/commands/module.js +13 -7
- package/commands/mv.d.ts +1 -1
- package/commands/mv.js +22 -20
- package/commands/open.d.ts +1 -1
- package/commands/open.js +21 -19
- package/commands/project/__tests__/add.test.js +15 -10
- package/commands/project/__tests__/create.test.js +19 -14
- package/commands/project/__tests__/deploy.test.js +143 -103
- package/commands/project/__tests__/devUnifiedFlow.test.js +157 -148
- package/commands/project/__tests__/download.test.js +19 -14
- package/commands/project/__tests__/installDeps.test.js +70 -32
- package/commands/project/__tests__/listBuilds.test.js +19 -14
- package/commands/project/__tests__/logs.test.js +94 -56
- package/commands/project/__tests__/migrate.test.js +30 -25
- package/commands/project/__tests__/migrateApp.test.js +22 -17
- package/commands/project/__tests__/open.test.js +21 -16
- package/commands/project/__tests__/profile.test.js +19 -14
- package/commands/project/__tests__/upload.test.js +23 -18
- package/commands/project/__tests__/watch.test.js +19 -14
- package/commands/project/add.d.ts +1 -1
- package/commands/project/add.js +36 -34
- package/commands/project/cloneApp.d.ts +1 -1
- package/commands/project/cloneApp.js +72 -67
- package/commands/project/create.d.ts +2 -2
- package/commands/project/create.js +68 -63
- package/commands/project/deploy.d.ts +3 -2
- package/commands/project/deploy.js +102 -91
- package/commands/project/dev/deprecatedFlow.d.ts +2 -2
- package/commands/project/dev/deprecatedFlow.js +58 -52
- package/commands/project/dev/index.d.ts +1 -1
- package/commands/project/dev/index.js +47 -44
- package/commands/project/dev/unifiedFlow.d.ts +3 -3
- package/commands/project/dev/unifiedFlow.js +74 -67
- package/commands/project/download.d.ts +1 -1
- package/commands/project/download.js +40 -35
- package/commands/project/installDeps.d.ts +1 -1
- package/commands/project/installDeps.js +34 -29
- package/commands/project/listBuilds.d.ts +1 -1
- package/commands/project/listBuilds.js +45 -40
- package/commands/project/logs.d.ts +1 -1
- package/commands/project/logs.js +54 -52
- package/commands/project/migrate.d.ts +1 -1
- package/commands/project/migrate.js +26 -24
- package/commands/project/migrateApp.d.ts +2 -2
- package/commands/project/migrateApp.js +20 -18
- package/commands/project/open.d.ts +1 -1
- package/commands/project/open.js +30 -25
- package/commands/project/profile/add.d.ts +1 -1
- package/commands/project/profile/add.js +73 -68
- package/commands/project/profile/delete.d.ts +1 -1
- package/commands/project/profile/delete.js +56 -51
- package/commands/project/profile.d.ts +1 -1
- package/commands/project/profile.js +14 -9
- package/commands/project/upload.d.ts +1 -1
- package/commands/project/upload.js +55 -50
- package/commands/project/validate.d.ts +1 -1
- package/commands/project/validate.js +40 -35
- package/commands/project/watch.d.ts +1 -1
- package/commands/project/watch.js +61 -59
- package/commands/project.d.ts +1 -1
- package/commands/project.js +43 -38
- package/commands/remove.d.ts +1 -1
- package/commands/remove.js +17 -15
- package/commands/sandbox/__tests__/create.test.js +20 -15
- package/commands/sandbox/__tests__/delete.test.js +20 -15
- package/commands/sandbox/create.d.ts +1 -1
- package/commands/sandbox/create.js +69 -67
- package/commands/sandbox/delete.d.ts +1 -1
- package/commands/sandbox/delete.js +96 -94
- package/commands/sandbox.d.ts +1 -1
- package/commands/sandbox.js +14 -9
- package/commands/secret/__tests__/addSecret.test.js +18 -13
- package/commands/secret/__tests__/deleteSecret.test.js +18 -13
- package/commands/secret/__tests__/listSecret.test.js +18 -13
- package/commands/secret/__tests__/updateSecret.test.js +18 -13
- package/commands/secret/addSecret.d.ts +1 -1
- package/commands/secret/addSecret.js +28 -26
- package/commands/secret/deleteSecret.d.ts +1 -1
- package/commands/secret/deleteSecret.js +29 -27
- package/commands/secret/listSecret.d.ts +1 -1
- package/commands/secret/listSecret.js +21 -19
- package/commands/secret/updateSecret.d.ts +1 -1
- package/commands/secret/updateSecret.js +27 -25
- package/commands/secret.d.ts +1 -1
- package/commands/secret.js +18 -13
- package/commands/testAccount/__tests__/create.test.js +22 -17
- package/commands/testAccount/__tests__/createConfig.test.js +11 -9
- package/commands/testAccount/__tests__/delete.test.js +20 -15
- package/commands/testAccount/create.d.ts +1 -1
- package/commands/testAccount/create.js +57 -62
- package/commands/testAccount/createConfig.d.ts +1 -3
- package/commands/testAccount/createConfig.js +47 -43
- package/commands/testAccount/delete.d.ts +1 -1
- package/commands/testAccount/delete.js +19 -17
- package/commands/testAccount.d.ts +1 -1
- package/commands/testAccount.js +15 -10
- package/commands/theme/__tests__/generate-selectors.test.js +12 -7
- package/commands/theme/__tests__/marketplace-validate.test.js +19 -14
- package/commands/theme/__tests__/preview.test.js +17 -12
- package/commands/theme/generate-selectors.d.ts +1 -1
- package/commands/theme/generate-selectors.js +28 -23
- package/commands/theme/marketplace-validate.d.ts +1 -1
- package/commands/theme/marketplace-validate.js +24 -19
- package/commands/theme/preview.d.ts +1 -1
- package/commands/theme/preview.js +65 -60
- package/commands/theme.d.ts +1 -1
- package/commands/theme.js +16 -11
- package/commands/upload.d.ts +1 -1
- package/commands/upload.js +82 -77
- package/commands/watch.d.ts +1 -1
- package/commands/watch.js +51 -45
- package/lang/en.d.ts +62 -23
- package/lang/en.js +434 -389
- package/lang/en.lyaml +0 -26
- package/lib/__tests__/accountTypes.test.js +22 -20
- package/lib/__tests__/buildAccount.test.js +90 -27
- package/lib/__tests__/commonOpts.test.js +22 -20
- package/lib/__tests__/dependencyManagement.test.js +51 -46
- package/lib/__tests__/developerTestAccounts.test.js +62 -27
- package/lib/__tests__/hasFeature.test.js +8 -6
- package/lib/__tests__/npm.test.js +20 -15
- package/lib/__tests__/oauth.test.js +28 -23
- package/lib/__tests__/parsing.test.js +20 -18
- package/lib/__tests__/polling.test.js +26 -24
- package/lib/__tests__/process.test.js +19 -14
- package/lib/__tests__/projectProfiles.test.js +39 -34
- package/lib/__tests__/sandboxSync.test.js +35 -30
- package/lib/__tests__/sandboxes.test.js +31 -29
- package/lib/__tests__/serverlessLogs.test.js +13 -8
- package/lib/__tests__/usageTracking.test.js +42 -47
- package/lib/__tests__/validation.test.js +20 -18
- package/lib/__tests__/yargsUtils.test.js +41 -6
- package/lib/accountTypes.js +34 -24
- package/lib/app/__tests__/migrate.test.js +99 -94
- package/lib/app/__tests__/migrate_legacy.test.js +31 -29
- package/lib/app/migrate.d.ts +3 -3
- package/lib/app/migrate.js +145 -127
- package/lib/app/migrate_legacy.d.ts +1 -1
- package/lib/app/migrate_legacy.js +78 -72
- package/lib/app/urls.js +9 -5
- package/lib/buildAccount.d.ts +8 -2
- package/lib/buildAccount.js +119 -61
- package/lib/commonOpts.d.ts +1 -1
- package/lib/commonOpts.js +59 -42
- package/lib/configMigrate.js +38 -34
- package/lib/configOptions.js +40 -34
- package/lib/constants.js +34 -31
- package/lib/customObject.js +6 -2
- package/lib/dependencyManagement.js +45 -37
- package/lib/developerTestAccounts.d.ts +1 -1
- package/lib/developerTestAccounts.js +39 -34
- package/lib/doctor/Diagnosis.d.ts +1 -1
- package/lib/doctor/Diagnosis.js +29 -25
- package/lib/doctor/DiagnosticInfoBuilder.d.ts +1 -1
- package/lib/doctor/DiagnosticInfoBuilder.js +37 -30
- package/lib/doctor/Doctor.d.ts +1 -1
- package/lib/doctor/Doctor.js +101 -94
- package/lib/doctor/__tests__/Diagnosis.test.js +14 -9
- package/lib/doctor/__tests__/DiagnosticInfoBuilder.test.js +34 -29
- package/lib/doctor/__tests__/Doctor.test.js +26 -24
- package/lib/enums/exitCodes.js +4 -1
- package/lib/errorHandlers/index.js +41 -32
- package/lib/errorHandlers/suppressError.d.ts +1 -1
- package/lib/errorHandlers/suppressError.js +31 -28
- package/lib/filesystem.js +15 -8
- package/lib/generateSelectors.js +29 -18
- package/lib/hasFeature.d.ts +1 -1
- package/lib/hasFeature.js +6 -3
- package/lib/interpolation.js +18 -11
- package/lib/lang.d.ts +1 -1
- package/lib/lang.js +27 -22
- package/lib/links.js +24 -16
- package/lib/marketplaceValidate.js +39 -29
- package/lib/mcp/setup.js +105 -72
- package/lib/middleware/__test__/configMiddleware.test.js +55 -20
- package/lib/middleware/__test__/gitMiddleware.test.js +42 -7
- package/lib/middleware/__test__/notificationsMiddleware.test.js +4 -2
- package/lib/middleware/__test__/requestMiddleware.test.js +11 -6
- package/lib/middleware/__test__/utils.test.js +11 -9
- package/lib/middleware/__test__/yargsChecksMiddleware.test.js +44 -9
- package/lib/middleware/autoUpdateMiddleware.js +40 -33
- package/lib/middleware/configMiddleware.js +42 -36
- package/lib/middleware/fireAlarmMiddleware.js +18 -12
- package/lib/middleware/gitMiddleware.js +8 -5
- package/lib/middleware/notificationsMiddleware.js +23 -16
- package/lib/middleware/requestMiddleware.js +10 -4
- package/lib/middleware/utils.js +4 -1
- package/lib/middleware/yargsChecksMiddleware.js +13 -10
- package/lib/npm.js +23 -14
- package/lib/oauth.js +35 -29
- package/lib/parsing.js +6 -3
- package/lib/polling.js +15 -11
- package/lib/process.js +19 -11
- package/lib/projectProfiles.d.ts +2 -2
- package/lib/projectProfiles.js +42 -32
- package/lib/projects/ProjectLogsManager.js +21 -18
- package/lib/projects/__tests__/AppDevModeInterface.test.js +145 -140
- package/lib/projects/__tests__/LocalDevProcess.test.js +73 -68
- package/lib/projects/__tests__/LocalDevWebsocketServer.test.js +37 -32
- package/lib/projects/__tests__/ProjectLogsManager.test.js +58 -56
- package/lib/projects/__tests__/buildAndDeploy.test.js +9 -7
- package/lib/projects/__tests__/components.test.js +14 -9
- package/lib/projects/__tests__/projects.test.js +40 -35
- package/lib/projects/__tests__/structure.test.js +81 -43
- package/lib/projects/add/__tests__/legacyAddComponent.test.js +28 -26
- package/lib/projects/add/__tests__/v3AddComponent.test.js +30 -25
- package/lib/projects/add/legacyAddComponent.d.ts +1 -1
- package/lib/projects/add/legacyAddComponent.js +30 -24
- package/lib/projects/add/v3AddComponent.d.ts +1 -1
- package/lib/projects/add/v3AddComponent.js +42 -36
- package/lib/projects/buildAndDeploy.d.ts +1 -1
- package/lib/projects/buildAndDeploy.js +97 -88
- package/lib/projects/components.js +25 -19
- package/lib/projects/config.d.ts +1 -1
- package/lib/projects/config.js +41 -32
- package/lib/projects/create/__tests__/legacy.test.js +57 -22
- package/lib/projects/create/__tests__/v3.test.js +7 -5
- package/lib/projects/create/index.d.ts +3 -3
- package/lib/projects/create/index.js +22 -19
- package/lib/projects/create/legacy.d.ts +1 -1
- package/lib/projects/create/legacy.js +31 -25
- package/lib/projects/create/v3.d.ts +3 -3
- package/lib/projects/create/v3.js +59 -49
- package/lib/projects/ensureProjectExists.js +37 -31
- package/lib/projects/localDev/AppDevModeInterface.d.ts +3 -3
- package/lib/projects/localDev/AppDevModeInterface.js +60 -58
- package/lib/projects/localDev/DevServerManager.d.ts +1 -1
- package/lib/projects/localDev/DevServerManager.js +24 -24
- package/lib/projects/localDev/DevServerManagerV2.d.ts +2 -2
- package/lib/projects/localDev/DevServerManagerV2.js +20 -17
- package/lib/projects/localDev/LocalDevLogger.d.ts +1 -1
- package/lib/projects/localDev/LocalDevLogger.js +64 -59
- package/lib/projects/localDev/LocalDevManager.d.ts +1 -1
- package/lib/projects/localDev/LocalDevManager.js +111 -106
- package/lib/projects/localDev/LocalDevProcess.d.ts +4 -4
- package/lib/projects/localDev/LocalDevProcess.js +30 -25
- package/lib/projects/localDev/LocalDevState.d.ts +3 -3
- package/lib/projects/localDev/LocalDevState.js +5 -3
- package/lib/projects/localDev/LocalDevWatcher.d.ts +1 -1
- package/lib/projects/localDev/LocalDevWatcher.js +11 -6
- package/lib/projects/localDev/LocalDevWebsocketServer.d.ts +1 -1
- package/lib/projects/localDev/LocalDevWebsocketServer.js +27 -25
- package/lib/projects/localDev/helpers.d.ts +4 -4
- package/lib/projects/localDev/helpers.js +174 -156
- package/lib/projects/structure.d.ts +4 -4
- package/lib/projects/structure.js +78 -32
- package/lib/projects/ui.js +13 -10
- package/lib/projects/upload.d.ts +3 -2
- package/lib/projects/upload.js +65 -55
- package/lib/projects/urls.js +24 -14
- package/lib/projects/watch.d.ts +1 -1
- package/lib/projects/watch.js +54 -48
- package/lib/prompts/__tests__/downloadProjectPrompt.test.js +11 -9
- package/lib/prompts/__tests__/projectsLogsPrompt.test.js +16 -11
- package/lib/prompts/accountNamePrompt.d.ts +1 -1
- package/lib/prompts/accountNamePrompt.js +31 -26
- package/lib/prompts/accountsPrompt.js +15 -12
- package/lib/prompts/cmsFieldPrompt.js +19 -13
- package/lib/prompts/createApiSamplePrompt.d.ts +1 -1
- package/lib/prompts/createApiSamplePrompt.js +12 -9
- package/lib/prompts/createDeveloperTestAccountConfigPrompt.d.ts +11 -10
- package/lib/prompts/createDeveloperTestAccountConfigPrompt.js +88 -43
- package/lib/prompts/createFunctionPrompt.js +20 -17
- package/lib/prompts/createModulePrompt.js +15 -12
- package/lib/prompts/createTemplatePrompt.js +8 -5
- package/lib/prompts/downloadProjectPrompt.js +20 -17
- package/lib/prompts/installAppPrompt.js +26 -19
- package/lib/prompts/personalAccessKeyPrompt.d.ts +2 -2
- package/lib/prompts/personalAccessKeyPrompt.js +47 -40
- package/lib/prompts/previewPrompt.js +22 -15
- package/lib/prompts/projectAddPrompt.d.ts +1 -1
- package/lib/prompts/projectAddPrompt.js +18 -14
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +1 -1
- package/lib/prompts/projectDevTargetAccountPrompt.js +54 -48
- package/lib/prompts/projectNameAndDestPrompt.d.ts +1 -1
- package/lib/prompts/projectNameAndDestPrompt.js +29 -22
- package/lib/prompts/projectNamePrompt.js +14 -11
- package/lib/prompts/projectsLogsPrompt.js +8 -5
- package/lib/prompts/promptUtils.d.ts +1 -1
- package/lib/prompts/promptUtils.js +87 -70
- package/lib/prompts/sandboxesPrompt.d.ts +1 -1
- package/lib/prompts/sandboxesPrompt.js +30 -26
- package/lib/prompts/secretPrompt.js +15 -10
- package/lib/prompts/selectAppPrompt.js +14 -11
- package/lib/prompts/selectHubDBTablePrompt.js +30 -24
- package/lib/prompts/selectProjectTemplatePrompt.d.ts +1 -1
- package/lib/prompts/selectProjectTemplatePrompt.js +13 -10
- package/lib/prompts/selectPublicAppForMigrationPrompt.js +25 -22
- package/lib/prompts/setAsDefaultAccountPrompt.js +16 -13
- package/lib/prompts/uploadPrompt.js +17 -11
- package/lib/sandboxSync.d.ts +1 -1
- package/lib/sandboxSync.js +65 -58
- package/lib/sandboxes.d.ts +1 -1
- package/lib/sandboxes.js +76 -68
- package/lib/schema.js +23 -12
- package/lib/serverlessLogs.js +52 -45
- package/lib/testUtils.js +8 -4
- package/lib/ui/SpinniesManager.d.ts +1 -1
- package/lib/ui/SpinniesManager.js +34 -29
- package/lib/ui/boxen.js +14 -11
- package/lib/ui/git.js +20 -14
- package/lib/ui/index.js +74 -56
- package/lib/ui/logger.js +13 -10
- package/lib/ui/serverlessFunctionLogs.js +20 -14
- package/lib/ui/spinniesUtils.js +39 -24
- package/lib/ui/supportHyperlinks.js +6 -3
- package/lib/ui/supportsColor.js +17 -11
- package/lib/ui/table.js +13 -6
- package/lib/upload.js +21 -15
- package/lib/usageTracking.d.ts +11 -0
- package/lib/usageTracking.js +95 -95
- package/lib/utils/hasFlag.js +8 -2
- package/lib/validation.js +87 -48
- package/lib/yargsUtils.d.ts +1 -1
- package/lib/yargsUtils.js +16 -13
- package/mcp-server/server.js +8 -6
- package/mcp-server/tools/index.js +16 -13
- package/mcp-server/tools/project/AddFeatureToProject.d.ts +1 -1
- package/mcp-server/tools/project/AddFeatureToProject.js +41 -34
- package/mcp-server/tools/project/CreateProjectTool.d.ts +3 -3
- package/mcp-server/tools/project/CreateProjectTool.js +52 -45
- package/mcp-server/tools/project/DeployProject.d.ts +1 -1
- package/mcp-server/tools/project/DeployProject.js +24 -17
- package/mcp-server/tools/project/GuidedWalkthroughTool.d.ts +1 -1
- package/mcp-server/tools/project/GuidedWalkthroughTool.js +27 -20
- package/mcp-server/tools/project/UploadProjectTools.d.ts +1 -1
- package/mcp-server/tools/project/UploadProjectTools.js +21 -11
- package/mcp-server/tools/project/ValidateProjectTool.d.ts +1 -1
- package/mcp-server/tools/project/ValidateProjectTool.js +19 -12
- package/mcp-server/tools/project/__tests__/AddFeatureToProject.test.js +15 -12
- package/mcp-server/tools/project/__tests__/CreateProjectTool.test.js +16 -13
- package/mcp-server/tools/project/__tests__/DeployProject.test.js +9 -6
- package/mcp-server/tools/project/__tests__/GuidedWalkthroughTool.test.js +7 -4
- package/mcp-server/tools/project/__tests__/UploadProjectTools.test.js +7 -4
- package/mcp-server/tools/project/__tests__/ValidateProjectTool.test.js +7 -4
- package/mcp-server/tools/project/constants.js +9 -3
- package/mcp-server/types.js +5 -1
- package/mcp-server/utils/__tests__/command.test.js +11 -9
- package/mcp-server/utils/__tests__/project.test.js +26 -18
- package/mcp-server/utils/command.d.ts +1 -1
- package/mcp-server/utils/command.js +11 -4
- package/mcp-server/utils/content.d.ts +1 -1
- package/mcp-server/utils/content.js +6 -2
- package/mcp-server/utils/project.js +17 -8
- package/mcp-server/utils/toolUsageTracking.d.ts +1 -0
- package/mcp-server/utils/toolUsageTracking.js +25 -0
- package/package.json +13 -17
- package/types/{cms.d.ts → Cms.d.ts} +1 -1
- package/types/Cms.js +2 -0
- package/types/LocalDev.d.ts +4 -4
- package/types/LocalDev.js +2 -1
- package/types/ProjectComponents.d.ts +2 -2
- package/types/ProjectComponents.js +2 -1
- package/types/Projects.d.ts +1 -1
- package/types/Projects.js +5 -2
- package/types/Prompts.js +2 -1
- package/types/Sandboxes.js +2 -0
- package/types/Yargs.js +2 -1
- package/types/sandboxes.js +0 -1
- /package/{types/cms.js → commands/app/__tests__/install.test.d.ts} +0 -0
- /package/types/{sandboxes.d.ts → Sandboxes.d.ts} +0 -0
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const UploadProjectTools_1 = require("../UploadProjectTools");
|
|
4
|
+
const project_1 = require("../../../utils/project");
|
|
3
5
|
vi.mock('@modelcontextprotocol/sdk/server/mcp.js');
|
|
4
6
|
vi.mock('../../../utils/project');
|
|
5
|
-
|
|
7
|
+
vi.mock('../../../utils/toolUsageTracking');
|
|
8
|
+
const mockRunCommandInDir = project_1.runCommandInDir;
|
|
6
9
|
describe('mcp-server/tools/project/UploadProjectTools', () => {
|
|
7
10
|
let mockMcpServer;
|
|
8
11
|
let tool;
|
|
@@ -15,7 +18,7 @@ describe('mcp-server/tools/project/UploadProjectTools', () => {
|
|
|
15
18
|
};
|
|
16
19
|
mockRegisteredTool = {};
|
|
17
20
|
mockMcpServer.registerTool.mockReturnValue(mockRegisteredTool);
|
|
18
|
-
tool = new UploadProjectTools(mockMcpServer);
|
|
21
|
+
tool = new UploadProjectTools_1.UploadProjectTools(mockMcpServer);
|
|
19
22
|
});
|
|
20
23
|
describe('register', () => {
|
|
21
24
|
it('should register tool with correct parameters', () => {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ValidateProjectTool_1 = require("../ValidateProjectTool");
|
|
4
|
+
const project_1 = require("../../../utils/project");
|
|
3
5
|
vi.mock('@modelcontextprotocol/sdk/server/mcp.js');
|
|
4
6
|
vi.mock('../../../utils/project');
|
|
5
|
-
|
|
7
|
+
vi.mock('../../../utils/toolUsageTracking');
|
|
8
|
+
const mockRunCommandInDir = project_1.runCommandInDir;
|
|
6
9
|
describe('mcp-server/tools/project/ValidateProjectTool', () => {
|
|
7
10
|
let mockMcpServer;
|
|
8
11
|
let tool;
|
|
@@ -15,7 +18,7 @@ describe('mcp-server/tools/project/ValidateProjectTool', () => {
|
|
|
15
18
|
};
|
|
16
19
|
mockRegisteredTool = {};
|
|
17
20
|
mockMcpServer.registerTool.mockReturnValue(mockRegisteredTool);
|
|
18
|
-
tool = new ValidateProjectTool(mockMcpServer);
|
|
21
|
+
tool = new ValidateProjectTool_1.ValidateProjectTool(mockMcpServer);
|
|
19
22
|
});
|
|
20
23
|
describe('register', () => {
|
|
21
24
|
it('should register tool with correct parameters', () => {
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
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.absoluteCurrentWorkingDirectory = exports.absoluteProjectPath = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.absoluteProjectPath = zod_1.default
|
|
3
9
|
.string()
|
|
4
10
|
.describe('The absolute path to the project directory.');
|
|
5
|
-
|
|
11
|
+
exports.absoluteCurrentWorkingDirectory = zod_1.default
|
|
6
12
|
.string()
|
|
7
13
|
.describe('The absolute path to the current working directory.');
|
package/mcp-server/types.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Tool = void 0;
|
|
4
|
+
class Tool {
|
|
2
5
|
mcpServer;
|
|
3
6
|
constructor(mcpServer) {
|
|
4
7
|
this.mcpServer = mcpServer;
|
|
@@ -11,3 +14,4 @@ export class Tool {
|
|
|
11
14
|
throw new Error('Must implement handler');
|
|
12
15
|
}
|
|
13
16
|
}
|
|
17
|
+
exports.Tool = Tool;
|
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("../command");
|
|
2
4
|
vi.mock('child_process');
|
|
3
5
|
vi.mock('util');
|
|
4
6
|
describe('mcp-server/utils/command', () => {
|
|
5
7
|
describe('addFlag', () => {
|
|
6
8
|
it('should add string flag to command', () => {
|
|
7
|
-
const result = addFlag('hs project create', 'name', 'test-project');
|
|
9
|
+
const result = (0, command_1.addFlag)('hs project create', 'name', 'test-project');
|
|
8
10
|
expect(result).toBe('hs project create --name "test-project"');
|
|
9
11
|
});
|
|
10
12
|
it('should add number flag to command', () => {
|
|
11
|
-
const result = addFlag('hs project deploy', 'build', 123);
|
|
13
|
+
const result = (0, command_1.addFlag)('hs project deploy', 'build', 123);
|
|
12
14
|
expect(result).toBe('hs project deploy --build "123"');
|
|
13
15
|
});
|
|
14
16
|
it('should add boolean flag to command', () => {
|
|
15
|
-
const result = addFlag('hs project upload', 'watch', true);
|
|
17
|
+
const result = (0, command_1.addFlag)('hs project upload', 'watch', true);
|
|
16
18
|
expect(result).toBe('hs project upload --watch "true"');
|
|
17
19
|
});
|
|
18
20
|
it('should add array flag to command', () => {
|
|
19
|
-
const result = addFlag('hs project create', 'features', [
|
|
21
|
+
const result = (0, command_1.addFlag)('hs project create', 'features', [
|
|
20
22
|
'card',
|
|
21
23
|
'settings',
|
|
22
24
|
]);
|
|
23
25
|
expect(result).toBe('hs project create --features "card" "settings"');
|
|
24
26
|
});
|
|
25
27
|
it('should handle empty array', () => {
|
|
26
|
-
const result = addFlag('hs project create', 'features', []);
|
|
28
|
+
const result = (0, command_1.addFlag)('hs project create', 'features', []);
|
|
27
29
|
expect(result).toBe('hs project create --features ');
|
|
28
30
|
});
|
|
29
31
|
it('should handle array with one item', () => {
|
|
30
|
-
const result = addFlag('hs project create', 'features', ['card']);
|
|
32
|
+
const result = (0, command_1.addFlag)('hs project create', 'features', ['card']);
|
|
31
33
|
expect(result).toBe('hs project create --features "card"');
|
|
32
34
|
});
|
|
33
35
|
it('should handle special characters in string values', () => {
|
|
34
|
-
const result = addFlag('hs project create', 'name', 'my-project with spaces');
|
|
36
|
+
const result = (0, command_1.addFlag)('hs project create', 'name', 'my-project with spaces');
|
|
35
37
|
expect(result).toBe('hs project create --name "my-project with spaces"');
|
|
36
38
|
});
|
|
37
39
|
it('should handle special characters in array values', () => {
|
|
38
|
-
const result = addFlag('hs project create', 'features', [
|
|
40
|
+
const result = (0, command_1.addFlag)('hs project create', 'features', [
|
|
39
41
|
'card with spaces',
|
|
40
42
|
'settings',
|
|
41
43
|
]);
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
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
|
+
const project_1 = require("../project");
|
|
7
|
+
const command_1 = require("../command");
|
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
5
10
|
vi.mock('../command');
|
|
6
11
|
vi.mock('fs');
|
|
7
12
|
vi.mock('path');
|
|
8
|
-
const mockExecAsync = execAsync;
|
|
9
|
-
const mockExistsSync =
|
|
10
|
-
const mockMkdirSync =
|
|
11
|
-
const mockResolve =
|
|
13
|
+
const mockExecAsync = command_1.execAsync;
|
|
14
|
+
const mockExistsSync = fs_1.default.existsSync;
|
|
15
|
+
const mockMkdirSync = fs_1.default.mkdirSync;
|
|
16
|
+
const mockResolve = path_1.default.resolve;
|
|
12
17
|
describe('mcp-server/utils/project', () => {
|
|
13
18
|
beforeEach(() => {
|
|
14
19
|
vi.clearAllMocks();
|
|
@@ -27,13 +32,14 @@ describe('mcp-server/utils/project', () => {
|
|
|
27
32
|
};
|
|
28
33
|
mockExistsSync.mockReturnValue(true);
|
|
29
34
|
mockExecAsync.mockResolvedValue(expectedResult);
|
|
30
|
-
const result = await runCommandInDir(mockDirectory, mockCommand);
|
|
35
|
+
const result = await (0, project_1.runCommandInDir)(mockDirectory, mockCommand);
|
|
31
36
|
expect(mockExistsSync).toHaveBeenCalledWith(mockDirectory);
|
|
32
37
|
expect(mockMkdirSync).not.toHaveBeenCalled();
|
|
33
38
|
expect(mockResolve).toHaveBeenCalledWith(mockDirectory);
|
|
34
|
-
expect(mockExecAsync).toHaveBeenCalledWith(mockCommand, {
|
|
39
|
+
expect(mockExecAsync).toHaveBeenCalledWith(mockCommand, expect.objectContaining({
|
|
35
40
|
cwd: mockResolvedPath,
|
|
36
|
-
|
|
41
|
+
env: expect.any(Object),
|
|
42
|
+
}));
|
|
37
43
|
expect(result).toEqual(expectedResult);
|
|
38
44
|
});
|
|
39
45
|
it('should create directory if it does not exist', async () => {
|
|
@@ -43,23 +49,25 @@ describe('mcp-server/utils/project', () => {
|
|
|
43
49
|
};
|
|
44
50
|
mockExistsSync.mockReturnValue(false);
|
|
45
51
|
mockExecAsync.mockResolvedValue(expectedResult);
|
|
46
|
-
const result = await runCommandInDir(mockDirectory, mockCommand);
|
|
52
|
+
const result = await (0, project_1.runCommandInDir)(mockDirectory, mockCommand);
|
|
47
53
|
expect(mockExistsSync).toHaveBeenCalledWith(mockDirectory);
|
|
48
54
|
expect(mockMkdirSync).toHaveBeenCalledWith(mockDirectory);
|
|
49
55
|
expect(mockResolve).toHaveBeenCalledWith(mockDirectory);
|
|
50
|
-
expect(mockExecAsync).toHaveBeenCalledWith(mockCommand, {
|
|
56
|
+
expect(mockExecAsync).toHaveBeenCalledWith(mockCommand, expect.objectContaining({
|
|
51
57
|
cwd: mockResolvedPath,
|
|
52
|
-
|
|
58
|
+
env: expect.any(Object),
|
|
59
|
+
}));
|
|
53
60
|
expect(result).toEqual(expectedResult);
|
|
54
61
|
});
|
|
55
62
|
it('should propagate execAsync errors', async () => {
|
|
56
63
|
const error = new Error('Command failed');
|
|
57
64
|
mockExistsSync.mockReturnValue(true);
|
|
58
65
|
mockExecAsync.mockRejectedValue(error);
|
|
59
|
-
await expect(runCommandInDir(mockDirectory, mockCommand)).rejects.toThrow('Command failed');
|
|
60
|
-
expect(mockExecAsync).toHaveBeenCalledWith(mockCommand, {
|
|
66
|
+
await expect((0, project_1.runCommandInDir)(mockDirectory, mockCommand)).rejects.toThrow('Command failed');
|
|
67
|
+
expect(mockExecAsync).toHaveBeenCalledWith(mockCommand, expect.objectContaining({
|
|
61
68
|
cwd: mockResolvedPath,
|
|
62
|
-
|
|
69
|
+
env: expect.any(Object),
|
|
70
|
+
}));
|
|
63
71
|
});
|
|
64
72
|
it('should handle stderr in results', async () => {
|
|
65
73
|
const expectedResult = {
|
|
@@ -68,7 +76,7 @@ describe('mcp-server/utils/project', () => {
|
|
|
68
76
|
};
|
|
69
77
|
mockExistsSync.mockReturnValue(true);
|
|
70
78
|
mockExecAsync.mockResolvedValue(expectedResult);
|
|
71
|
-
const result = await runCommandInDir(mockDirectory, mockCommand);
|
|
79
|
+
const result = await (0, project_1.runCommandInDir)(mockDirectory, mockCommand);
|
|
72
80
|
expect(result.stdout).toBe('some output');
|
|
73
81
|
expect(result.stderr).toBe('warning message');
|
|
74
82
|
});
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
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.execAsync = void 0;
|
|
7
|
+
exports.addFlag = addFlag;
|
|
8
|
+
const util_1 = __importDefault(require("util"));
|
|
9
|
+
const child_process_1 = require("child_process");
|
|
10
|
+
exports.execAsync = util_1.default.promisify(child_process_1.exec);
|
|
11
|
+
function addFlag(command, flagName, value) {
|
|
5
12
|
if (Array.isArray(value)) {
|
|
6
13
|
return `${command} --${flagName} ${value.map(item => `"${item}"`).join(' ')}`;
|
|
7
14
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TextContent, TextContentResponse } from '../types
|
|
1
|
+
import { TextContent, TextContentResponse } from '../types';
|
|
2
2
|
export declare function formatTextContents(...outputs: (string | undefined)[]): TextContentResponse;
|
|
3
3
|
export declare function formatTextContent(text: string): TextContent;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatTextContents = formatTextContents;
|
|
4
|
+
exports.formatTextContent = formatTextContent;
|
|
5
|
+
function formatTextContents(...outputs) {
|
|
2
6
|
const content = [];
|
|
3
7
|
outputs.forEach(output => {
|
|
4
8
|
if (output !== undefined) {
|
|
@@ -9,7 +13,7 @@ export function formatTextContents(...outputs) {
|
|
|
9
13
|
content,
|
|
10
14
|
};
|
|
11
15
|
}
|
|
12
|
-
|
|
16
|
+
function formatTextContent(text) {
|
|
13
17
|
return {
|
|
14
18
|
type: 'text',
|
|
15
19
|
text,
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
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.runCommandInDir = runCommandInDir;
|
|
7
|
+
const command_1 = require("./command");
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const fs_1 = __importDefault(require("fs"));
|
|
10
|
+
async function runCommandInDir(directory, command) {
|
|
11
|
+
if (!fs_1.default.existsSync(directory)) {
|
|
12
|
+
fs_1.default.mkdirSync(directory);
|
|
7
13
|
}
|
|
8
|
-
return execAsync(command, {
|
|
9
|
-
cwd:
|
|
14
|
+
return (0, command_1.execAsync)(command, {
|
|
15
|
+
cwd: path_1.default.resolve(directory),
|
|
16
|
+
env: {
|
|
17
|
+
...process.env,
|
|
18
|
+
},
|
|
10
19
|
});
|
|
11
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function trackToolUsage(toolName: string): Promise<void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.trackToolUsage = trackToolUsage;
|
|
4
|
+
const trackUsage_1 = require("@hubspot/local-dev-lib/trackUsage");
|
|
5
|
+
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
6
|
+
const usageTracking_1 = require("../../lib/usageTracking");
|
|
7
|
+
const config_1 = require("@hubspot/local-dev-lib/config");
|
|
8
|
+
async function trackToolUsage(toolName) {
|
|
9
|
+
if (!(0, config_1.isTrackingAllowed)()) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const usageTrackingEvent = {
|
|
13
|
+
action: 'cli-mcp-tool-invocation',
|
|
14
|
+
os: (0, usageTracking_1.getPlatform)(),
|
|
15
|
+
...(0, usageTracking_1.getNodeVersionData)(),
|
|
16
|
+
command: toolName,
|
|
17
|
+
type: process.env.HUBSPOT_MCP_AI_AGENT,
|
|
18
|
+
};
|
|
19
|
+
const accountId = (0, config_1.getAccountId)() || undefined;
|
|
20
|
+
try {
|
|
21
|
+
logger_1.logger.info('Tracking tool usage');
|
|
22
|
+
await (0, trackUsage_1.trackUsage)('cli-interaction', usageTracking_1.EventClass.INTERACTION, usageTrackingEvent, accountId);
|
|
23
|
+
}
|
|
24
|
+
catch (error) { }
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cli",
|
|
3
|
-
"version": "7.7.21-experimental.
|
|
3
|
+
"version": "7.7.21-experimental.1",
|
|
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
|
-
"type": "module",
|
|
8
7
|
"dependencies": {
|
|
9
|
-
"@hubspot/local-dev-lib": "3.
|
|
10
|
-
"@hubspot/project-parsing-lib": "0.5.
|
|
8
|
+
"@hubspot/local-dev-lib": "3.14.0",
|
|
9
|
+
"@hubspot/project-parsing-lib": "0.5.3",
|
|
11
10
|
"@hubspot/serverless-dev-runtime": "7.0.6",
|
|
12
11
|
"@hubspot/theme-preview-dev-server": "0.0.10",
|
|
13
|
-
"@hubspot/ui-extensions-dev-server": "0.9.
|
|
12
|
+
"@hubspot/ui-extensions-dev-server": "0.9.4",
|
|
14
13
|
"archiver": "7.0.1",
|
|
15
14
|
"boxen": "8.0.1",
|
|
16
|
-
"chalk": "
|
|
15
|
+
"chalk": "4.1.2",
|
|
17
16
|
"chokidar": "3.6.0",
|
|
18
17
|
"cli-cursor": "3.1.0",
|
|
19
18
|
"cli-progress": "3.12.0",
|
|
@@ -24,11 +23,11 @@
|
|
|
24
23
|
"js-yaml": "4.1.0",
|
|
25
24
|
"moment": "2.30.1",
|
|
26
25
|
"open": "7.4.2",
|
|
27
|
-
"p-queue": "
|
|
28
|
-
"strip-ansi": "
|
|
26
|
+
"p-queue": "6.6.2",
|
|
27
|
+
"strip-ansi": "5.2.0",
|
|
29
28
|
"table": "6.9.0",
|
|
30
29
|
"tmp": "0.2.3",
|
|
31
|
-
"update-notifier": "
|
|
30
|
+
"update-notifier": "5.1.0",
|
|
32
31
|
"ws": "^8.18.2",
|
|
33
32
|
"yargs": "17.7.2",
|
|
34
33
|
"yargs-parser": "21.1.1"
|
|
@@ -39,12 +38,10 @@
|
|
|
39
38
|
"@types/express": "^5.0.0",
|
|
40
39
|
"@types/findup-sync": "^4.0.5",
|
|
41
40
|
"@types/fs-extra": "^11.0.4",
|
|
42
|
-
"@types/inquirer": "^9.0.8",
|
|
43
41
|
"@types/js-yaml": "^4.0.9",
|
|
44
42
|
"@types/node": "^24.1.0",
|
|
45
43
|
"@types/semver": "^7.5.8",
|
|
46
44
|
"@types/tmp": "^0.2.6",
|
|
47
|
-
"@types/update-notifier": "^6.0.8",
|
|
48
45
|
"@types/ws": "^8.18.1",
|
|
49
46
|
"@types/yargs": "^17.0.33",
|
|
50
47
|
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
|
@@ -59,7 +56,6 @@
|
|
|
59
56
|
"prettier": "^3.4.2",
|
|
60
57
|
"semver": "^7.6.3",
|
|
61
58
|
"ts-node": "^10.9.2",
|
|
62
|
-
"tsx": "^4.20.3",
|
|
63
59
|
"typescript": "^5.6.2",
|
|
64
60
|
"vitest": "^2.1.9"
|
|
65
61
|
},
|
|
@@ -68,7 +64,7 @@
|
|
|
68
64
|
"@modelcontextprotocol/sdk": "1.13.3"
|
|
69
65
|
},
|
|
70
66
|
"scripts": {
|
|
71
|
-
"build": "
|
|
67
|
+
"build": "ts-node ./scripts/build.ts",
|
|
72
68
|
"build-docker": "docker image build --tag hs-cli-image . && docker image prune -f",
|
|
73
69
|
"circular-deps": "yarn madge --circular .",
|
|
74
70
|
"debug-mcp": "yarn build && npx @modelcontextprotocol/inspector node dist/mcp-server/server.js",
|
|
@@ -76,11 +72,11 @@
|
|
|
76
72
|
"hs-debug": "yarn build && NODE_DEBUG=http* node --inspect-brk ./dist/bin/hs",
|
|
77
73
|
"lint": "echo 'Linting is disabled for Blazar'",
|
|
78
74
|
"lint:local": "eslint . && prettier --list-different './**/*.{ts,js,json}'",
|
|
79
|
-
"list-all-commands": "yarn
|
|
80
|
-
"local-link": "yarn
|
|
81
|
-
"mcp-local": "yarn
|
|
75
|
+
"list-all-commands": "yarn ts-node ./scripts/get-all-commands.ts",
|
|
76
|
+
"local-link": "yarn ts-node ./scripts/linking.ts",
|
|
77
|
+
"mcp-local": "yarn ts-node ./scripts/mcp-local.ts",
|
|
82
78
|
"prettier:write": "prettier --write './**/*.{ts,js,json}'",
|
|
83
|
-
"release": "yarn
|
|
79
|
+
"release": "yarn ts-node ./scripts/release.ts release",
|
|
84
80
|
"test": "vitest run",
|
|
85
81
|
"test-dev": "vitest",
|
|
86
82
|
"test-cli": "yarn build && yarn --cwd 'acceptance-tests' test-ci",
|
package/types/Cms.js
ADDED
package/types/LocalDev.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types
|
|
1
|
+
import { IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types';
|
|
2
2
|
import { Build } from '@hubspot/local-dev-lib/types/Build';
|
|
3
3
|
import { Environment } from '@hubspot/local-dev-lib/types/Config';
|
|
4
4
|
import { ValueOf } from '@hubspot/local-dev-lib/types/Utils';
|
|
5
|
-
import { ProjectConfig } from './Projects
|
|
6
|
-
import LocalDevState from '../lib/projects/localDev/LocalDevState
|
|
7
|
-
import { APP_INSTALLATION_STATES, LOCAL_DEV_SERVER_MESSAGE_TYPES } from '../lib/constants
|
|
5
|
+
import { ProjectConfig } from './Projects';
|
|
6
|
+
import LocalDevState from '../lib/projects/localDev/LocalDevState';
|
|
7
|
+
import { APP_INSTALLATION_STATES, LOCAL_DEV_SERVER_MESSAGE_TYPES } from '../lib/constants';
|
|
8
8
|
export type LocalDevStateConstructorOptions = {
|
|
9
9
|
targetProjectAccountId: number;
|
|
10
10
|
targetTestingAccountId: number;
|
package/types/LocalDev.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types
|
|
2
|
-
import { IR_COMPONENT_TYPES, APP_DISTRIBUTION_TYPES, APP_AUTH_TYPES } from '../lib/constants
|
|
1
|
+
import { IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types';
|
|
2
|
+
import { IR_COMPONENT_TYPES, APP_DISTRIBUTION_TYPES, APP_AUTH_TYPES } from '../lib/constants';
|
|
3
3
|
import { ValueOf } from '@hubspot/local-dev-lib/types/Utils';
|
|
4
4
|
type AppDistributionType = ValueOf<typeof APP_DISTRIBUTION_TYPES>;
|
|
5
5
|
type AppAuthType = ValueOf<typeof APP_AUTH_TYPES>;
|
package/types/Projects.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Build, SubbuildStatus } from '@hubspot/local-dev-lib/types/Build';
|
|
2
2
|
import { Deploy, SubdeployStatus } from '@hubspot/local-dev-lib/types/Deploy';
|
|
3
|
-
import { appComponent, marketplaceDistribution, oAuth, privateDistribution, staticAuth } from '../lib/constants
|
|
3
|
+
import { appComponent, marketplaceDistribution, oAuth, privateDistribution, staticAuth } from '../lib/constants';
|
|
4
4
|
export type ProjectTemplate = {
|
|
5
5
|
name: string;
|
|
6
6
|
label: string;
|
package/types/Projects.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ComponentTypes = void 0;
|
|
4
|
+
var ComponentTypes;
|
|
2
5
|
(function (ComponentTypes) {
|
|
3
6
|
ComponentTypes["PrivateApp"] = "private-app";
|
|
4
7
|
ComponentTypes["PublicApp"] = "public-app";
|
|
5
8
|
ComponentTypes["HublTheme"] = "hubl-theme";
|
|
6
|
-
})(ComponentTypes || (ComponentTypes = {}));
|
|
9
|
+
})(ComponentTypes || (exports.ComponentTypes = ComponentTypes = {}));
|
package/types/Prompts.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/types/Yargs.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/types/sandboxes.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
File without changes
|