@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,25 +1,30 @@
|
|
|
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 yargs_1 = __importDefault(require("yargs"));
|
|
7
|
+
const start_1 = __importDefault(require("../mcp/start"));
|
|
8
|
+
const setup_1 = __importDefault(require("../mcp/setup"));
|
|
9
|
+
const mcp_1 = __importDefault(require("../mcp"));
|
|
5
10
|
vi.mock('../mcp/start');
|
|
6
11
|
vi.mock('../mcp/setup');
|
|
7
12
|
vi.mock('../../lib/commonOpts');
|
|
8
13
|
const commandSpy = vi
|
|
9
|
-
.spyOn(
|
|
10
|
-
.mockReturnValue(
|
|
14
|
+
.spyOn(yargs_1.default, 'command')
|
|
15
|
+
.mockReturnValue(yargs_1.default);
|
|
11
16
|
const demandCommandSpy = vi
|
|
12
|
-
.spyOn(
|
|
13
|
-
.mockReturnValue(
|
|
17
|
+
.spyOn(yargs_1.default, 'demandCommand')
|
|
18
|
+
.mockReturnValue(yargs_1.default);
|
|
14
19
|
describe('commands/mcp', () => {
|
|
15
20
|
describe('command', () => {
|
|
16
21
|
it('should have the correct command structure', () => {
|
|
17
|
-
expect(
|
|
22
|
+
expect(mcp_1.default.command).toEqual('mcp');
|
|
18
23
|
});
|
|
19
24
|
});
|
|
20
25
|
describe('describe', () => {
|
|
21
26
|
it('should provide a description', () => {
|
|
22
|
-
expect(
|
|
27
|
+
expect(mcp_1.default.describe).toBeUndefined();
|
|
23
28
|
});
|
|
24
29
|
});
|
|
25
30
|
describe('builder', () => {
|
|
@@ -27,18 +32,18 @@ describe('commands/mcp', () => {
|
|
|
27
32
|
commandSpy.mockClear();
|
|
28
33
|
demandCommandSpy.mockClear();
|
|
29
34
|
});
|
|
30
|
-
const subcommands = [
|
|
35
|
+
const subcommands = [start_1.default, setup_1.default];
|
|
31
36
|
it('should demand the command takes one positional argument', () => {
|
|
32
|
-
|
|
37
|
+
mcp_1.default.builder(yargs_1.default);
|
|
33
38
|
expect(demandCommandSpy).toHaveBeenCalledTimes(1);
|
|
34
39
|
expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
|
|
35
40
|
});
|
|
36
41
|
it('should add the correct number of sub commands', () => {
|
|
37
|
-
|
|
42
|
+
mcp_1.default.builder(yargs_1.default);
|
|
38
43
|
expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
|
|
39
44
|
});
|
|
40
45
|
it.each(subcommands)('should attach the %s subcommand', module => {
|
|
41
|
-
|
|
46
|
+
mcp_1.default.builder(yargs_1.default);
|
|
42
47
|
expect(module).toBeDefined();
|
|
43
48
|
expect(commandSpy).toHaveBeenCalledWith(module);
|
|
44
49
|
});
|
|
@@ -1,42 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
40
|
+
const commonOpts = __importStar(require("../../lib/commonOpts"));
|
|
41
|
+
const mv_1 = __importDefault(require("../mv"));
|
|
4
42
|
vi.mock('../../lib/commonOpts');
|
|
5
43
|
const positionalSpy = vi
|
|
6
|
-
.spyOn(
|
|
7
|
-
.mockReturnValue(
|
|
44
|
+
.spyOn(yargs_1.default, 'positional')
|
|
45
|
+
.mockReturnValue(yargs_1.default);
|
|
8
46
|
describe('commands/mv', () => {
|
|
9
47
|
describe('command', () => {
|
|
10
48
|
it('should have the correct command structure', () => {
|
|
11
|
-
expect(
|
|
49
|
+
expect(mv_1.default.command).toBe('mv <srcPath> <destPath>');
|
|
12
50
|
});
|
|
13
51
|
});
|
|
14
52
|
describe('describe', () => {
|
|
15
53
|
it('should provide a description', () => {
|
|
16
|
-
expect(
|
|
54
|
+
expect(mv_1.default.describe).toBeDefined();
|
|
17
55
|
});
|
|
18
56
|
});
|
|
19
57
|
describe('builder', () => {
|
|
20
58
|
it('should support the correct options', () => {
|
|
21
|
-
|
|
59
|
+
mv_1.default.builder(yargs_1.default);
|
|
22
60
|
expect(commonOpts.addGlobalOptions).toHaveBeenCalledTimes(1);
|
|
23
|
-
expect(commonOpts.addGlobalOptions).toHaveBeenCalledWith(
|
|
61
|
+
expect(commonOpts.addGlobalOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
24
62
|
expect(commonOpts.addConfigOptions).toHaveBeenCalledTimes(1);
|
|
25
|
-
expect(commonOpts.addConfigOptions).toHaveBeenCalledWith(
|
|
63
|
+
expect(commonOpts.addConfigOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
26
64
|
expect(commonOpts.addAccountOptions).toHaveBeenCalledTimes(1);
|
|
27
|
-
expect(commonOpts.addAccountOptions).toHaveBeenCalledWith(
|
|
65
|
+
expect(commonOpts.addAccountOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
28
66
|
expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledTimes(1);
|
|
29
|
-
expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledWith(
|
|
67
|
+
expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
30
68
|
});
|
|
31
69
|
it('should add the srcPath positional argument', () => {
|
|
32
|
-
|
|
70
|
+
mv_1.default.builder(yargs_1.default);
|
|
33
71
|
expect(positionalSpy).toHaveBeenCalledWith('srcPath', {
|
|
34
72
|
describe: 'Remote hubspot path',
|
|
35
73
|
type: 'string',
|
|
36
74
|
});
|
|
37
75
|
});
|
|
38
76
|
it('should add the destPath positional argument', () => {
|
|
39
|
-
|
|
77
|
+
mv_1.default.builder(yargs_1.default);
|
|
40
78
|
expect(positionalSpy).toHaveBeenCalledWith('destPath', {
|
|
41
79
|
describe: 'Remote hubspot path',
|
|
42
80
|
type: 'string',
|
|
@@ -1,6 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
40
|
+
const open_1 = __importDefault(require("../open"));
|
|
41
|
+
const commonOpts = __importStar(require("../../lib/commonOpts"));
|
|
4
42
|
vi.mock('../../lib/commonOpts');
|
|
5
43
|
// Spies are now safe to create since the methods exist on the mock
|
|
6
44
|
const positionalSpy = vi.spyOn(mockYargs, 'positional');
|
|
@@ -9,35 +47,35 @@ const exampleSpy = vi.spyOn(mockYargs, 'example');
|
|
|
9
47
|
describe('commands/open', () => {
|
|
10
48
|
describe('command', () => {
|
|
11
49
|
it('should have the correct command structure', () => {
|
|
12
|
-
expect(
|
|
50
|
+
expect(open_1.default.command).toBe('open [shortcut]');
|
|
13
51
|
});
|
|
14
52
|
});
|
|
15
53
|
describe('describe', () => {
|
|
16
54
|
it('should provide a description', () => {
|
|
17
|
-
expect(
|
|
55
|
+
expect(open_1.default.describe).toBeDefined();
|
|
18
56
|
});
|
|
19
57
|
});
|
|
20
58
|
describe('builder', () => {
|
|
21
59
|
it('should support the correct options', () => {
|
|
22
|
-
|
|
60
|
+
open_1.default.builder(yargs_1.default);
|
|
23
61
|
expect(commonOpts.addGlobalOptions).toHaveBeenCalledTimes(1);
|
|
24
|
-
expect(commonOpts.addGlobalOptions).toHaveBeenCalledWith(
|
|
62
|
+
expect(commonOpts.addGlobalOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
25
63
|
expect(commonOpts.addConfigOptions).toHaveBeenCalledTimes(1);
|
|
26
|
-
expect(commonOpts.addConfigOptions).toHaveBeenCalledWith(
|
|
64
|
+
expect(commonOpts.addConfigOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
27
65
|
expect(commonOpts.addAccountOptions).toHaveBeenCalledTimes(1);
|
|
28
|
-
expect(commonOpts.addAccountOptions).toHaveBeenCalledWith(
|
|
66
|
+
expect(commonOpts.addAccountOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
29
67
|
expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledTimes(1);
|
|
30
|
-
expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledWith(
|
|
68
|
+
expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
31
69
|
});
|
|
32
70
|
it('should add the shortcut positional argument', () => {
|
|
33
|
-
|
|
71
|
+
open_1.default.builder(yargs_1.default);
|
|
34
72
|
expect(positionalSpy).toHaveBeenCalledWith('[shortcut]', {
|
|
35
73
|
describe: expect.any(String),
|
|
36
74
|
type: 'string',
|
|
37
75
|
});
|
|
38
76
|
});
|
|
39
77
|
it('should add the list option', () => {
|
|
40
|
-
|
|
78
|
+
open_1.default.builder(yargs_1.default);
|
|
41
79
|
expect(optionSpy).toHaveBeenCalledWith('list', {
|
|
42
80
|
alias: 'l',
|
|
43
81
|
describe: expect.any(String),
|
|
@@ -45,7 +83,7 @@ describe('commands/open', () => {
|
|
|
45
83
|
});
|
|
46
84
|
});
|
|
47
85
|
it('should add examples', () => {
|
|
48
|
-
|
|
86
|
+
open_1.default.builder(yargs_1.default);
|
|
49
87
|
expect(exampleSpy).toHaveBeenCalledWith([
|
|
50
88
|
['$0 open'],
|
|
51
89
|
['$0 open --list'],
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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 yargs_1 = __importDefault(require("yargs"));
|
|
7
|
+
const deploy_1 = __importDefault(require("../project/deploy"));
|
|
8
|
+
const create_1 = __importDefault(require("../project/create"));
|
|
9
|
+
const upload_1 = __importDefault(require("../project/upload"));
|
|
10
|
+
const listBuilds_1 = __importDefault(require("../project/listBuilds"));
|
|
11
|
+
const logs_1 = __importDefault(require("../project/logs"));
|
|
12
|
+
const watch_1 = __importDefault(require("../project/watch"));
|
|
13
|
+
const download_1 = __importDefault(require("../project/download"));
|
|
14
|
+
const open_1 = __importDefault(require("../project/open"));
|
|
15
|
+
const dev_1 = __importDefault(require("../project/dev"));
|
|
16
|
+
const add_1 = __importDefault(require("../project/add"));
|
|
17
|
+
const migrateApp_1 = __importDefault(require("../project/migrateApp"));
|
|
18
|
+
const migrate_1 = __importDefault(require("../project/migrate"));
|
|
19
|
+
const cloneApp_1 = __importDefault(require("../project/cloneApp"));
|
|
20
|
+
const installDeps_1 = __importDefault(require("../project/installDeps"));
|
|
21
|
+
const validate_1 = __importDefault(require("../project/validate"));
|
|
22
|
+
const profile_1 = __importDefault(require("../project/profile"));
|
|
23
|
+
const project_1 = __importDefault(require("../project"));
|
|
19
24
|
vi.mock('../project/deploy');
|
|
20
25
|
vi.mock('../project/create');
|
|
21
26
|
vi.mock('../project/upload');
|
|
@@ -39,55 +44,55 @@ vi.mock('../project/installDeps');
|
|
|
39
44
|
vi.mock('../project/profile');
|
|
40
45
|
vi.mock('../../lib/commonOpts');
|
|
41
46
|
const commandSpy = vi
|
|
42
|
-
.spyOn(
|
|
43
|
-
.mockReturnValue(
|
|
47
|
+
.spyOn(yargs_1.default, 'command')
|
|
48
|
+
.mockReturnValue(yargs_1.default);
|
|
44
49
|
const demandCommandSpy = vi
|
|
45
|
-
.spyOn(
|
|
46
|
-
.mockReturnValue(
|
|
50
|
+
.spyOn(yargs_1.default, 'demandCommand')
|
|
51
|
+
.mockReturnValue(yargs_1.default);
|
|
47
52
|
describe('commands/project', () => {
|
|
48
53
|
describe('command', () => {
|
|
49
54
|
it('should have the correct command structure', () => {
|
|
50
|
-
expect(
|
|
55
|
+
expect(project_1.default.command).toEqual(['project', 'projects']);
|
|
51
56
|
});
|
|
52
57
|
});
|
|
53
58
|
describe('describe', () => {
|
|
54
59
|
it('should contain the beta tag', () => {
|
|
55
|
-
expect(
|
|
60
|
+
expect(project_1.default.describe).toContain('[BETA]');
|
|
56
61
|
});
|
|
57
62
|
it('should provide a description', () => {
|
|
58
|
-
expect(
|
|
63
|
+
expect(project_1.default.describe).toBeDefined();
|
|
59
64
|
});
|
|
60
65
|
});
|
|
61
66
|
describe('builder', () => {
|
|
62
67
|
const subcommands = [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
create_1.default,
|
|
69
|
+
add_1.default,
|
|
70
|
+
watch_1.default,
|
|
71
|
+
dev_1.default,
|
|
72
|
+
upload_1.default,
|
|
73
|
+
deploy_1.default,
|
|
74
|
+
logs_1.default,
|
|
75
|
+
listBuilds_1.default,
|
|
76
|
+
download_1.default,
|
|
77
|
+
open_1.default,
|
|
78
|
+
migrateApp_1.default,
|
|
79
|
+
migrate_1.default,
|
|
80
|
+
cloneApp_1.default,
|
|
81
|
+
installDeps_1.default,
|
|
82
|
+
profile_1.default,
|
|
83
|
+
validate_1.default,
|
|
79
84
|
];
|
|
80
85
|
it('should demand the command takes one positional argument', () => {
|
|
81
|
-
|
|
86
|
+
project_1.default.builder(yargs_1.default);
|
|
82
87
|
expect(demandCommandSpy).toHaveBeenCalledTimes(1);
|
|
83
88
|
expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
|
|
84
89
|
});
|
|
85
90
|
it('should add the correct number of sub commands', () => {
|
|
86
|
-
|
|
91
|
+
project_1.default.builder(yargs_1.default);
|
|
87
92
|
expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
|
|
88
93
|
});
|
|
89
94
|
it.each(subcommands)('should attach the %s subcommand', module => {
|
|
90
|
-
|
|
95
|
+
project_1.default.builder(yargs_1.default);
|
|
91
96
|
expect(module).toBeDefined();
|
|
92
97
|
expect(commandSpy).toHaveBeenCalledWith(module);
|
|
93
98
|
});
|
|
@@ -1,35 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
40
|
+
const commonOpts = __importStar(require("../../lib/commonOpts"));
|
|
41
|
+
const remove_1 = __importDefault(require("../remove"));
|
|
4
42
|
vi.mock('../../lib/commonOpts');
|
|
5
43
|
const positionalSpy = vi
|
|
6
|
-
.spyOn(
|
|
7
|
-
.mockReturnValue(
|
|
44
|
+
.spyOn(yargs_1.default, 'positional')
|
|
45
|
+
.mockReturnValue(yargs_1.default);
|
|
8
46
|
describe('commands/remove', () => {
|
|
9
47
|
describe('command', () => {
|
|
10
48
|
it('should have the correct command structure', () => {
|
|
11
|
-
expect(
|
|
49
|
+
expect(remove_1.default.command).toBe('remove <path>');
|
|
12
50
|
});
|
|
13
51
|
});
|
|
14
52
|
describe('describe', () => {
|
|
15
53
|
it('should provide a description', () => {
|
|
16
|
-
expect(
|
|
54
|
+
expect(remove_1.default.describe).toBeDefined();
|
|
17
55
|
});
|
|
18
56
|
});
|
|
19
57
|
describe('builder', () => {
|
|
20
58
|
it('should support the correct options', () => {
|
|
21
|
-
|
|
59
|
+
remove_1.default.builder(yargs_1.default);
|
|
22
60
|
expect(commonOpts.addGlobalOptions).toHaveBeenCalledTimes(1);
|
|
23
|
-
expect(commonOpts.addGlobalOptions).toHaveBeenCalledWith(
|
|
61
|
+
expect(commonOpts.addGlobalOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
24
62
|
expect(commonOpts.addConfigOptions).toHaveBeenCalledTimes(1);
|
|
25
|
-
expect(commonOpts.addConfigOptions).toHaveBeenCalledWith(
|
|
63
|
+
expect(commonOpts.addConfigOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
26
64
|
expect(commonOpts.addAccountOptions).toHaveBeenCalledTimes(1);
|
|
27
|
-
expect(commonOpts.addAccountOptions).toHaveBeenCalledWith(
|
|
65
|
+
expect(commonOpts.addAccountOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
28
66
|
expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledTimes(1);
|
|
29
|
-
expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledWith(
|
|
67
|
+
expect(commonOpts.addUseEnvironmentOptions).toHaveBeenCalledWith(yargs_1.default);
|
|
30
68
|
});
|
|
31
69
|
it('should add the path positional argument', () => {
|
|
32
|
-
|
|
70
|
+
remove_1.default.builder(yargs_1.default);
|
|
33
71
|
expect(positionalSpy).toHaveBeenCalledWith('path', {
|
|
34
72
|
describe: expect.any(String),
|
|
35
73
|
type: 'string',
|
|
@@ -1,24 +1,29 @@
|
|
|
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 yargs_1 = __importDefault(require("yargs"));
|
|
7
|
+
const create_1 = __importDefault(require("../sandbox/create"));
|
|
8
|
+
const delete_1 = __importDefault(require("../sandbox/delete"));
|
|
9
|
+
const sandbox_1 = __importDefault(require("../sandbox"));
|
|
5
10
|
vi.mock('../sandbox/create');
|
|
6
11
|
vi.mock('../sandbox/delete');
|
|
7
12
|
const commandSpy = vi
|
|
8
|
-
.spyOn(
|
|
9
|
-
.mockReturnValue(
|
|
13
|
+
.spyOn(yargs_1.default, 'command')
|
|
14
|
+
.mockReturnValue(yargs_1.default);
|
|
10
15
|
const demandCommandSpy = vi
|
|
11
|
-
.spyOn(
|
|
12
|
-
.mockReturnValue(
|
|
16
|
+
.spyOn(yargs_1.default, 'demandCommand')
|
|
17
|
+
.mockReturnValue(yargs_1.default);
|
|
13
18
|
describe('commands/sandbox', () => {
|
|
14
19
|
describe('command', () => {
|
|
15
20
|
it('should have the correct command structure', () => {
|
|
16
|
-
expect(
|
|
21
|
+
expect(sandbox_1.default.command).toEqual(['sandbox', 'sandboxes']);
|
|
17
22
|
});
|
|
18
23
|
});
|
|
19
24
|
describe('describe', () => {
|
|
20
25
|
it('should provide a description', () => {
|
|
21
|
-
expect(
|
|
26
|
+
expect(sandbox_1.default.describe).toBeDefined();
|
|
22
27
|
});
|
|
23
28
|
});
|
|
24
29
|
describe('builder', () => {
|
|
@@ -26,18 +31,18 @@ describe('commands/sandbox', () => {
|
|
|
26
31
|
commandSpy.mockClear();
|
|
27
32
|
demandCommandSpy.mockClear();
|
|
28
33
|
});
|
|
29
|
-
const subcommands = [
|
|
34
|
+
const subcommands = [create_1.default, delete_1.default];
|
|
30
35
|
it('should demand the command takes one positional argument', () => {
|
|
31
|
-
|
|
36
|
+
sandbox_1.default.builder(yargs_1.default);
|
|
32
37
|
expect(demandCommandSpy).toHaveBeenCalledTimes(1);
|
|
33
38
|
expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
|
|
34
39
|
});
|
|
35
40
|
it('should add the correct number of sub commands', () => {
|
|
36
|
-
|
|
41
|
+
sandbox_1.default.builder(yargs_1.default);
|
|
37
42
|
expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
|
|
38
43
|
});
|
|
39
44
|
it.each(subcommands)('should attach the %s subcommand', module => {
|
|
40
|
-
|
|
45
|
+
sandbox_1.default.builder(yargs_1.default);
|
|
41
46
|
expect(commandSpy).toHaveBeenCalledWith(module);
|
|
42
47
|
});
|
|
43
48
|
});
|
|
@@ -1,29 +1,34 @@
|
|
|
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
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
7
|
+
const addSecret_1 = __importDefault(require("../secret/addSecret"));
|
|
8
|
+
const deleteSecret_1 = __importDefault(require("../secret/deleteSecret"));
|
|
9
|
+
const listSecret_1 = __importDefault(require("../secret/listSecret"));
|
|
10
|
+
const updateSecret_1 = __importDefault(require("../secret/updateSecret"));
|
|
11
|
+
const secret_1 = __importDefault(require("../secret"));
|
|
7
12
|
vi.mock('../secret/addSecret');
|
|
8
13
|
vi.mock('../secret/deleteSecret');
|
|
9
14
|
vi.mock('../secret/listSecret');
|
|
10
15
|
vi.mock('../secret/updateSecret');
|
|
11
16
|
vi.mock('../../lib/commonOpts');
|
|
12
17
|
const commandSpy = vi
|
|
13
|
-
.spyOn(
|
|
14
|
-
.mockReturnValue(
|
|
18
|
+
.spyOn(yargs_1.default, 'command')
|
|
19
|
+
.mockReturnValue(yargs_1.default);
|
|
15
20
|
const demandCommandSpy = vi
|
|
16
|
-
.spyOn(
|
|
17
|
-
.mockReturnValue(
|
|
21
|
+
.spyOn(yargs_1.default, 'demandCommand')
|
|
22
|
+
.mockReturnValue(yargs_1.default);
|
|
18
23
|
describe('commands/account', () => {
|
|
19
24
|
describe('command', () => {
|
|
20
25
|
it('should have the correct command structure', () => {
|
|
21
|
-
expect(
|
|
26
|
+
expect(secret_1.default.command).toEqual(['secret', 'secrets']);
|
|
22
27
|
});
|
|
23
28
|
});
|
|
24
29
|
describe('describe', () => {
|
|
25
30
|
it('should provide a description', () => {
|
|
26
|
-
expect(
|
|
31
|
+
expect(secret_1.default.describe).toBeDefined();
|
|
27
32
|
});
|
|
28
33
|
});
|
|
29
34
|
describe('builder', () => {
|
|
@@ -31,18 +36,18 @@ describe('commands/account', () => {
|
|
|
31
36
|
commandSpy.mockClear();
|
|
32
37
|
demandCommandSpy.mockClear();
|
|
33
38
|
});
|
|
34
|
-
const subcommands = [
|
|
39
|
+
const subcommands = [addSecret_1.default, deleteSecret_1.default, listSecret_1.default, updateSecret_1.default];
|
|
35
40
|
it('should demand the command takes one positional argument', () => {
|
|
36
|
-
|
|
41
|
+
secret_1.default.builder(yargs_1.default);
|
|
37
42
|
expect(demandCommandSpy).toHaveBeenCalledTimes(1);
|
|
38
43
|
expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
|
|
39
44
|
});
|
|
40
45
|
it('should add the correct number of sub commands', () => {
|
|
41
|
-
|
|
46
|
+
secret_1.default.builder(yargs_1.default);
|
|
42
47
|
expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
|
|
43
48
|
});
|
|
44
49
|
it.each(subcommands)('should attach the %s subcommand', module => {
|
|
45
|
-
|
|
50
|
+
secret_1.default.builder(yargs_1.default);
|
|
46
51
|
expect(commandSpy).toHaveBeenCalledWith(module);
|
|
47
52
|
});
|
|
48
53
|
});
|