@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,22 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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("../testAccount/create"));
|
|
8
|
+
const createConfig_1 = __importDefault(require("../testAccount/createConfig"));
|
|
9
|
+
const delete_1 = __importDefault(require("../testAccount/delete"));
|
|
10
|
+
const testAccount_1 = __importDefault(require("../testAccount"));
|
|
6
11
|
vi.mock('../testAccount/create');
|
|
7
12
|
vi.mock('../testAccount/createConfig');
|
|
8
13
|
vi.mock('../testAccount/delete');
|
|
9
14
|
vi.mock('../../lib/commonOpts');
|
|
10
15
|
const commandSpy = vi
|
|
11
|
-
.spyOn(
|
|
12
|
-
.mockReturnValue(
|
|
16
|
+
.spyOn(yargs_1.default, 'command')
|
|
17
|
+
.mockReturnValue(yargs_1.default);
|
|
13
18
|
const demandCommandSpy = vi
|
|
14
|
-
.spyOn(
|
|
15
|
-
.mockReturnValue(
|
|
19
|
+
.spyOn(yargs_1.default, 'demandCommand')
|
|
20
|
+
.mockReturnValue(yargs_1.default);
|
|
16
21
|
describe('commands/testAccount', () => {
|
|
17
22
|
describe('command', () => {
|
|
18
23
|
it('should have the correct command structure', () => {
|
|
19
|
-
expect(
|
|
24
|
+
expect(testAccount_1.default.command).toEqual([
|
|
20
25
|
'test-account',
|
|
21
26
|
'test-accounts',
|
|
22
27
|
]);
|
|
@@ -34,21 +39,21 @@ describe('commands/testAccount', () => {
|
|
|
34
39
|
demandCommandSpy.mockClear();
|
|
35
40
|
});
|
|
36
41
|
const subcommands = [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
create_1.default,
|
|
43
|
+
createConfig_1.default,
|
|
44
|
+
delete_1.default,
|
|
40
45
|
];
|
|
41
46
|
it('should demand the command takes one positional argument', () => {
|
|
42
|
-
|
|
47
|
+
testAccount_1.default.builder(yargs_1.default);
|
|
43
48
|
expect(demandCommandSpy).toHaveBeenCalledTimes(1);
|
|
44
49
|
expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
|
|
45
50
|
});
|
|
46
51
|
it('should add the correct number of sub commands', () => {
|
|
47
|
-
|
|
52
|
+
testAccount_1.default.builder(yargs_1.default);
|
|
48
53
|
expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
|
|
49
54
|
});
|
|
50
55
|
it.each(subcommands)('should attach the %s subcommand', module => {
|
|
51
|
-
|
|
56
|
+
testAccount_1.default.builder(yargs_1.default);
|
|
52
57
|
expect(commandSpy).toHaveBeenCalledWith(module);
|
|
53
58
|
});
|
|
54
59
|
});
|
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 preview_1 = __importDefault(require("../theme/preview"));
|
|
8
|
+
const generate_selectors_1 = __importDefault(require("../theme/generate-selectors"));
|
|
9
|
+
const marketplace_validate_1 = __importDefault(require("../theme/marketplace-validate"));
|
|
10
|
+
const theme_1 = __importDefault(require("../theme"));
|
|
6
11
|
vi.mock('../theme/preview');
|
|
7
12
|
vi.mock('../theme/generate-selectors');
|
|
8
13
|
vi.mock('../theme/marketplace-validate');
|
|
9
14
|
vi.mock('../../lib/commonOpts');
|
|
10
15
|
const commandSpy = vi
|
|
11
|
-
.spyOn(
|
|
12
|
-
.mockReturnValue(
|
|
16
|
+
.spyOn(yargs_1.default, 'command')
|
|
17
|
+
.mockReturnValue(yargs_1.default);
|
|
13
18
|
const demandCommandSpy = vi
|
|
14
|
-
.spyOn(
|
|
15
|
-
.mockReturnValue(
|
|
19
|
+
.spyOn(yargs_1.default, 'demandCommand')
|
|
20
|
+
.mockReturnValue(yargs_1.default);
|
|
16
21
|
describe('commands/theme', () => {
|
|
17
22
|
describe('command', () => {
|
|
18
23
|
it('should have the correct command structure', () => {
|
|
19
|
-
expect(
|
|
24
|
+
expect(theme_1.default.command).toEqual(['theme', 'themes']);
|
|
20
25
|
});
|
|
21
26
|
});
|
|
22
27
|
describe('describe', () => {
|
|
23
28
|
it('should provide a description', () => {
|
|
24
|
-
expect(
|
|
29
|
+
expect(theme_1.default.describe).toBeDefined();
|
|
25
30
|
});
|
|
26
31
|
});
|
|
27
32
|
describe('builder', () => {
|
|
@@ -29,18 +34,18 @@ describe('commands/theme', () => {
|
|
|
29
34
|
commandSpy.mockClear();
|
|
30
35
|
demandCommandSpy.mockClear();
|
|
31
36
|
});
|
|
32
|
-
const subcommands = [
|
|
37
|
+
const subcommands = [preview_1.default, generate_selectors_1.default, marketplace_validate_1.default];
|
|
33
38
|
it('should demand the command takes one positional argument', () => {
|
|
34
|
-
|
|
39
|
+
theme_1.default.builder(yargs_1.default);
|
|
35
40
|
expect(demandCommandSpy).toHaveBeenCalledTimes(1);
|
|
36
41
|
expect(demandCommandSpy).toHaveBeenCalledWith(1, '');
|
|
37
42
|
});
|
|
38
43
|
it('should add the correct number of sub commands', () => {
|
|
39
|
-
|
|
44
|
+
theme_1.default.builder(yargs_1.default);
|
|
40
45
|
expect(commandSpy).toHaveBeenCalledTimes(subcommands.length);
|
|
41
46
|
});
|
|
42
47
|
it.each(subcommands)('should attach the %s subcommand', module => {
|
|
43
|
-
|
|
48
|
+
theme_1.default.builder(yargs_1.default);
|
|
44
49
|
expect(commandSpy).toHaveBeenCalledWith(module);
|
|
45
50
|
});
|
|
46
51
|
});
|
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 commonOpts_1 = require("../../../lib/commonOpts");
|
|
8
|
+
const auth_1 = __importDefault(require("../auth"));
|
|
4
9
|
vi.mock('../../../lib/commonOpts');
|
|
5
10
|
describe('commands/account/auth', () => {
|
|
6
|
-
const yargsMock =
|
|
11
|
+
const yargsMock = yargs_1.default;
|
|
7
12
|
describe('command', () => {
|
|
8
13
|
it('should have the correct command structure', () => {
|
|
9
|
-
expect(
|
|
14
|
+
expect(auth_1.default.command).toEqual('auth');
|
|
10
15
|
});
|
|
11
16
|
});
|
|
12
17
|
describe('describe', () => {
|
|
13
18
|
it('should provide a description', () => {
|
|
14
|
-
expect(
|
|
19
|
+
expect(auth_1.default.describe).toBeDefined();
|
|
15
20
|
});
|
|
16
21
|
});
|
|
17
22
|
describe('builder', () => {
|
|
18
23
|
it('should support the correct options', () => {
|
|
19
|
-
|
|
20
|
-
expect(addTestingOptions).toHaveBeenCalledTimes(1);
|
|
21
|
-
expect(addTestingOptions).toHaveBeenCalledWith(yargsMock);
|
|
22
|
-
expect(addGlobalOptions).toHaveBeenCalledTimes(1);
|
|
23
|
-
expect(addGlobalOptions).toHaveBeenCalledWith(yargsMock);
|
|
24
|
+
auth_1.default.builder(yargsMock);
|
|
25
|
+
expect(commonOpts_1.addTestingOptions).toHaveBeenCalledTimes(1);
|
|
26
|
+
expect(commonOpts_1.addTestingOptions).toHaveBeenCalledWith(yargsMock);
|
|
27
|
+
expect(commonOpts_1.addGlobalOptions).toHaveBeenCalledTimes(1);
|
|
28
|
+
expect(commonOpts_1.addGlobalOptions).toHaveBeenCalledWith(yargsMock);
|
|
24
29
|
});
|
|
25
30
|
});
|
|
26
31
|
});
|
|
@@ -1,28 +1,33 @@
|
|
|
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 commonOpts_1 = require("../../../lib/commonOpts");
|
|
8
|
+
const commonOpts_2 = require("../../../lib/commonOpts");
|
|
9
|
+
const clean_1 = __importDefault(require("../clean"));
|
|
5
10
|
vi.mock('../../../lib/commonOpts');
|
|
6
11
|
describe('commands/account/clean', () => {
|
|
7
|
-
const yargsMock =
|
|
12
|
+
const yargsMock = yargs_1.default;
|
|
8
13
|
describe('command', () => {
|
|
9
14
|
it('should have the correct command structure', () => {
|
|
10
|
-
expect(
|
|
15
|
+
expect(clean_1.default.command).toEqual('clean');
|
|
11
16
|
});
|
|
12
17
|
});
|
|
13
18
|
describe('describe', () => {
|
|
14
19
|
it('should provide a description', () => {
|
|
15
|
-
expect(
|
|
20
|
+
expect(clean_1.default.describe).toBeDefined();
|
|
16
21
|
});
|
|
17
22
|
});
|
|
18
23
|
describe('builder', () => {
|
|
19
24
|
it('should support the correct options', () => {
|
|
20
|
-
|
|
25
|
+
clean_1.default.builder(yargsMock);
|
|
21
26
|
expect(yargsMock.example).toHaveBeenCalledTimes(1);
|
|
22
|
-
expect(addConfigOptions).toHaveBeenCalledTimes(1);
|
|
23
|
-
expect(addConfigOptions).toHaveBeenCalledWith(yargsMock);
|
|
24
|
-
expect(addTestingOptions).toHaveBeenCalledTimes(1);
|
|
25
|
-
expect(addTestingOptions).toHaveBeenCalledWith(yargsMock);
|
|
27
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledTimes(1);
|
|
28
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledWith(yargsMock);
|
|
29
|
+
expect(commonOpts_2.addTestingOptions).toHaveBeenCalledTimes(1);
|
|
30
|
+
expect(commonOpts_2.addTestingOptions).toHaveBeenCalledWith(yargsMock);
|
|
26
31
|
});
|
|
27
32
|
});
|
|
28
33
|
});
|
|
@@ -1,26 +1,31 @@
|
|
|
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
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
7
|
+
const createOverride_1 = __importDefault(require("../createOverride"));
|
|
3
8
|
const positionalSpy = vi
|
|
4
|
-
.spyOn(
|
|
5
|
-
.mockReturnValue(
|
|
9
|
+
.spyOn(yargs_1.default, 'positional')
|
|
10
|
+
.mockReturnValue(yargs_1.default);
|
|
6
11
|
const exampleSpy = vi
|
|
7
|
-
.spyOn(
|
|
8
|
-
.mockReturnValue(
|
|
12
|
+
.spyOn(yargs_1.default, 'example')
|
|
13
|
+
.mockReturnValue(yargs_1.default);
|
|
9
14
|
describe('commands/account/createOverride', () => {
|
|
10
|
-
const yargsMock =
|
|
15
|
+
const yargsMock = yargs_1.default;
|
|
11
16
|
describe('command', () => {
|
|
12
17
|
it('should have the correct command structure', () => {
|
|
13
|
-
expect(
|
|
18
|
+
expect(createOverride_1.default.command).toEqual('create-override [account]');
|
|
14
19
|
});
|
|
15
20
|
});
|
|
16
21
|
describe('describe', () => {
|
|
17
22
|
it('should provide a description', () => {
|
|
18
|
-
expect(
|
|
23
|
+
expect(createOverride_1.default.describe).toBeDefined();
|
|
19
24
|
});
|
|
20
25
|
});
|
|
21
26
|
describe('builder', () => {
|
|
22
27
|
it('should support the correct options', () => {
|
|
23
|
-
|
|
28
|
+
createOverride_1.default.builder(yargsMock);
|
|
24
29
|
expect(exampleSpy).toHaveBeenCalledTimes(1);
|
|
25
30
|
expect(positionalSpy).toHaveBeenCalledTimes(1);
|
|
26
31
|
expect(positionalSpy).toHaveBeenCalledWith('account', {
|
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 commonOpts_1 = require("../../../lib/commonOpts");
|
|
8
|
+
const info_1 = __importDefault(require("../info"));
|
|
4
9
|
vi.mock('../../../lib/commonOpts');
|
|
5
10
|
const exampleSpy = vi
|
|
6
|
-
.spyOn(
|
|
7
|
-
.mockReturnValue(
|
|
11
|
+
.spyOn(yargs_1.default, 'example')
|
|
12
|
+
.mockReturnValue(yargs_1.default);
|
|
8
13
|
describe('commands/account/info', () => {
|
|
9
|
-
const yargsMock =
|
|
14
|
+
const yargsMock = yargs_1.default;
|
|
10
15
|
describe('command', () => {
|
|
11
16
|
it('should have the correct command structure', () => {
|
|
12
|
-
expect(
|
|
17
|
+
expect(info_1.default.command).toEqual('info [account]');
|
|
13
18
|
});
|
|
14
19
|
});
|
|
15
20
|
describe('describe', () => {
|
|
16
21
|
it('should provide a description', () => {
|
|
17
|
-
expect(
|
|
22
|
+
expect(info_1.default.describe).toBeDefined();
|
|
18
23
|
});
|
|
19
24
|
});
|
|
20
25
|
describe('builder', () => {
|
|
21
26
|
it('should support the correct options', () => {
|
|
22
|
-
|
|
27
|
+
info_1.default.builder(yargsMock);
|
|
23
28
|
expect(exampleSpy).toHaveBeenCalledTimes(1);
|
|
24
|
-
expect(addConfigOptions).toHaveBeenCalledTimes(1);
|
|
25
|
-
expect(addConfigOptions).toHaveBeenCalledWith(yargsMock);
|
|
29
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledTimes(1);
|
|
30
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledWith(yargsMock);
|
|
26
31
|
});
|
|
27
32
|
});
|
|
28
33
|
});
|
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 commonOpts_1 = require("../../../lib/commonOpts");
|
|
8
|
+
const list_1 = __importDefault(require("../list"));
|
|
4
9
|
vi.mock('../../../lib/commonOpts');
|
|
5
10
|
const exampleSpy = vi
|
|
6
|
-
.spyOn(
|
|
7
|
-
.mockReturnValue(
|
|
11
|
+
.spyOn(yargs_1.default, 'example')
|
|
12
|
+
.mockReturnValue(yargs_1.default);
|
|
8
13
|
describe('commands/account/list', () => {
|
|
9
|
-
const yargsMock =
|
|
14
|
+
const yargsMock = yargs_1.default;
|
|
10
15
|
describe('command', () => {
|
|
11
16
|
it('should have the correct command structure', () => {
|
|
12
|
-
expect(
|
|
17
|
+
expect(list_1.default.command).toEqual(['list', 'ls']);
|
|
13
18
|
});
|
|
14
19
|
});
|
|
15
20
|
describe('describe', () => {
|
|
16
21
|
it('should provide a description', () => {
|
|
17
|
-
expect(
|
|
22
|
+
expect(list_1.default.describe).toBeDefined();
|
|
18
23
|
});
|
|
19
24
|
});
|
|
20
25
|
describe('builder', () => {
|
|
21
26
|
it('should support the correct options', () => {
|
|
22
|
-
|
|
27
|
+
list_1.default.builder(yargsMock);
|
|
23
28
|
expect(exampleSpy).toHaveBeenCalledTimes(1);
|
|
24
|
-
expect(addConfigOptions).toHaveBeenCalledTimes(1);
|
|
25
|
-
expect(addConfigOptions).toHaveBeenCalledWith(yargsMock);
|
|
29
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledTimes(1);
|
|
30
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledWith(yargsMock);
|
|
26
31
|
});
|
|
27
32
|
});
|
|
28
33
|
});
|
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 commonOpts_1 = require("../../../lib/commonOpts");
|
|
8
|
+
const remove_1 = __importDefault(require("../remove"));
|
|
4
9
|
vi.mock('../../../lib/commonOpts');
|
|
5
10
|
const positionalSpy = vi
|
|
6
|
-
.spyOn(
|
|
7
|
-
.mockReturnValue(
|
|
11
|
+
.spyOn(yargs_1.default, 'positional')
|
|
12
|
+
.mockReturnValue(yargs_1.default);
|
|
8
13
|
const exampleSpy = vi
|
|
9
|
-
.spyOn(
|
|
10
|
-
.mockReturnValue(
|
|
14
|
+
.spyOn(yargs_1.default, 'example')
|
|
15
|
+
.mockReturnValue(yargs_1.default);
|
|
11
16
|
describe('commands/account/remove', () => {
|
|
12
|
-
const yargsMock =
|
|
17
|
+
const yargsMock = yargs_1.default;
|
|
13
18
|
describe('command', () => {
|
|
14
19
|
it('should have the correct command structure', () => {
|
|
15
|
-
expect(
|
|
20
|
+
expect(remove_1.default.command).toEqual('remove [account]');
|
|
16
21
|
});
|
|
17
22
|
});
|
|
18
23
|
describe('describe', () => {
|
|
19
24
|
it('should provide a description', () => {
|
|
20
|
-
expect(
|
|
25
|
+
expect(remove_1.default.describe).toBeDefined();
|
|
21
26
|
});
|
|
22
27
|
});
|
|
23
28
|
describe('builder', () => {
|
|
24
29
|
it('should support the correct options', () => {
|
|
25
|
-
|
|
30
|
+
remove_1.default.builder(yargsMock);
|
|
26
31
|
expect(exampleSpy).toHaveBeenCalledTimes(1);
|
|
27
32
|
expect(positionalSpy).toHaveBeenCalledTimes(1);
|
|
28
33
|
expect(positionalSpy).toHaveBeenCalledWith('account', {
|
|
29
34
|
describe: expect.any(String),
|
|
30
35
|
type: 'string',
|
|
31
36
|
});
|
|
32
|
-
expect(addConfigOptions).toHaveBeenCalledTimes(1);
|
|
33
|
-
expect(addConfigOptions).toHaveBeenCalledWith(yargsMock);
|
|
37
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledTimes(1);
|
|
38
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledWith(yargsMock);
|
|
34
39
|
});
|
|
35
40
|
});
|
|
36
41
|
});
|
|
@@ -1,24 +1,29 @@
|
|
|
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
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
7
|
+
const removeOverride_1 = __importDefault(require("../removeOverride"));
|
|
3
8
|
vi.mock('yargs');
|
|
4
9
|
const optionsSpy = vi
|
|
5
|
-
.spyOn(
|
|
6
|
-
.mockReturnValue(
|
|
10
|
+
.spyOn(yargs_1.default, 'options')
|
|
11
|
+
.mockReturnValue(yargs_1.default);
|
|
7
12
|
describe('commands/account/removeOverride', () => {
|
|
8
|
-
const yargsMock =
|
|
13
|
+
const yargsMock = yargs_1.default;
|
|
9
14
|
describe('command', () => {
|
|
10
15
|
it('should have the correct command structure', () => {
|
|
11
|
-
expect(
|
|
16
|
+
expect(removeOverride_1.default.command).toEqual('remove-override');
|
|
12
17
|
});
|
|
13
18
|
});
|
|
14
19
|
describe('describe', () => {
|
|
15
20
|
it('should provide a description', () => {
|
|
16
|
-
expect(
|
|
21
|
+
expect(removeOverride_1.default.describe).toBeDefined();
|
|
17
22
|
});
|
|
18
23
|
});
|
|
19
24
|
describe('builder', () => {
|
|
20
25
|
it('should support the correct options', () => {
|
|
21
|
-
|
|
26
|
+
removeOverride_1.default.builder(yargsMock);
|
|
22
27
|
expect(optionsSpy).toHaveBeenCalledTimes(1);
|
|
23
28
|
});
|
|
24
29
|
});
|
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 commonOpts_1 = require("../../../lib/commonOpts");
|
|
8
|
+
const rename_1 = __importDefault(require("../rename"));
|
|
4
9
|
vi.mock('../../../lib/commonOpts');
|
|
5
10
|
const positionalSpy = vi
|
|
6
|
-
.spyOn(
|
|
7
|
-
.mockReturnValue(
|
|
11
|
+
.spyOn(yargs_1.default, 'positional')
|
|
12
|
+
.mockReturnValue(yargs_1.default);
|
|
8
13
|
const exampleSpy = vi
|
|
9
|
-
.spyOn(
|
|
10
|
-
.mockReturnValue(
|
|
14
|
+
.spyOn(yargs_1.default, 'example')
|
|
15
|
+
.mockReturnValue(yargs_1.default);
|
|
11
16
|
describe('commands/account/rename', () => {
|
|
12
|
-
const yargsMock =
|
|
17
|
+
const yargsMock = yargs_1.default;
|
|
13
18
|
describe('command', () => {
|
|
14
19
|
it('should have the correct command structure', () => {
|
|
15
|
-
expect(
|
|
20
|
+
expect(rename_1.default.command).toEqual('rename <account-name> <new-name>');
|
|
16
21
|
});
|
|
17
22
|
});
|
|
18
23
|
describe('describe', () => {
|
|
19
24
|
it('should provide a description', () => {
|
|
20
|
-
expect(
|
|
25
|
+
expect(rename_1.default.describe).toBeDefined();
|
|
21
26
|
});
|
|
22
27
|
});
|
|
23
28
|
describe('builder', () => {
|
|
24
29
|
it('should support the correct options', () => {
|
|
25
|
-
|
|
30
|
+
rename_1.default.builder(yargsMock);
|
|
26
31
|
expect(exampleSpy).toHaveBeenCalledTimes(1);
|
|
27
32
|
expect(positionalSpy).toHaveBeenCalledTimes(2);
|
|
28
33
|
expect(positionalSpy).toHaveBeenCalledWith('account-name', {
|
|
@@ -33,10 +38,10 @@ describe('commands/account/rename', () => {
|
|
|
33
38
|
describe: expect.any(String),
|
|
34
39
|
type: 'string',
|
|
35
40
|
});
|
|
36
|
-
expect(addConfigOptions).toHaveBeenCalledTimes(1);
|
|
37
|
-
expect(addConfigOptions).toHaveBeenCalledWith(yargsMock);
|
|
38
|
-
expect(addAccountOptions).toHaveBeenCalledTimes(1);
|
|
39
|
-
expect(addAccountOptions).toHaveBeenCalledWith(yargsMock);
|
|
41
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledTimes(1);
|
|
42
|
+
expect(commonOpts_1.addConfigOptions).toHaveBeenCalledWith(yargsMock);
|
|
43
|
+
expect(commonOpts_1.addAccountOptions).toHaveBeenCalledTimes(1);
|
|
44
|
+
expect(commonOpts_1.addAccountOptions).toHaveBeenCalledWith(yargsMock);
|
|
40
45
|
});
|
|
41
46
|
});
|
|
42
47
|
});
|
|
@@ -1,26 +1,31 @@
|
|
|
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
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
7
|
+
const use_1 = __importDefault(require("../use"));
|
|
3
8
|
const positionalSpy = vi
|
|
4
|
-
.spyOn(
|
|
5
|
-
.mockReturnValue(
|
|
9
|
+
.spyOn(yargs_1.default, 'positional')
|
|
10
|
+
.mockReturnValue(yargs_1.default);
|
|
6
11
|
const exampleSpy = vi
|
|
7
|
-
.spyOn(
|
|
8
|
-
.mockReturnValue(
|
|
12
|
+
.spyOn(yargs_1.default, 'example')
|
|
13
|
+
.mockReturnValue(yargs_1.default);
|
|
9
14
|
describe('commands/account/use', () => {
|
|
10
|
-
const yargsMock =
|
|
15
|
+
const yargsMock = yargs_1.default;
|
|
11
16
|
describe('command', () => {
|
|
12
17
|
it('should have the correct command structure', () => {
|
|
13
|
-
expect(
|
|
18
|
+
expect(use_1.default.command).toEqual('use [account]');
|
|
14
19
|
});
|
|
15
20
|
});
|
|
16
21
|
describe('describe', () => {
|
|
17
22
|
it('should provide a description', () => {
|
|
18
|
-
expect(
|
|
23
|
+
expect(use_1.default.describe).toBeDefined();
|
|
19
24
|
});
|
|
20
25
|
});
|
|
21
26
|
describe('builder', () => {
|
|
22
27
|
it('should support the correct options', () => {
|
|
23
|
-
|
|
28
|
+
use_1.default.builder(yargsMock);
|
|
24
29
|
expect(exampleSpy).toHaveBeenCalledTimes(1);
|
|
25
30
|
expect(positionalSpy).toHaveBeenCalledTimes(1);
|
|
26
31
|
expect(positionalSpy).toHaveBeenCalledWith('account', {
|