@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,42 +1,47 @@
|
|
|
1
|
-
|
|
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 vitest_1 = require("vitest");
|
|
2
7
|
// Mock the ui-extensions-dev-server module
|
|
3
|
-
vi.mock('@hubspot/ui-extensions-dev-server', () => {
|
|
8
|
+
vitest_1.vi.mock('@hubspot/ui-extensions-dev-server', () => {
|
|
4
9
|
return {
|
|
5
10
|
DevModeUnifiedInterface: {
|
|
6
|
-
setup: vi.fn().mockResolvedValue(undefined),
|
|
7
|
-
start: vi.fn().mockResolvedValue(undefined),
|
|
8
|
-
fileChange: vi.fn().mockResolvedValue(undefined),
|
|
9
|
-
cleanup: vi.fn().mockResolvedValue(undefined),
|
|
11
|
+
setup: vitest_1.vi.fn().mockResolvedValue(undefined),
|
|
12
|
+
start: vitest_1.vi.fn().mockResolvedValue(undefined),
|
|
13
|
+
fileChange: vitest_1.vi.fn().mockResolvedValue(undefined),
|
|
14
|
+
cleanup: vitest_1.vi.fn().mockResolvedValue(undefined),
|
|
10
15
|
},
|
|
11
16
|
};
|
|
12
17
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
vi.mock('@hubspot/local-dev-lib/api/localDevAuth');
|
|
29
|
-
vi.mock('@hubspot/local-dev-lib/api/appsDev');
|
|
30
|
-
vi.mock('@hubspot/local-dev-lib/portManager');
|
|
31
|
-
vi.mock('@hubspot/local-dev-lib/config');
|
|
32
|
-
vi.mock('../../prompts/installAppPrompt');
|
|
33
|
-
vi.mock('../../prompts/promptUtils');
|
|
34
|
-
vi.mock('../../app/urls');
|
|
35
|
-
vi.mock('../../accountTypes');
|
|
36
|
-
vi.mock('../../ui/logger');
|
|
37
|
-
vi.mock('../../errorHandlers/index');
|
|
38
|
-
vi.mock('../localDev/LocalDevState');
|
|
39
|
-
vi.mock('../localDev/LocalDevLogger');
|
|
18
|
+
const localDevAuth_1 = require("@hubspot/local-dev-lib/api/localDevAuth");
|
|
19
|
+
const appsDev_1 = require("@hubspot/local-dev-lib/api/appsDev");
|
|
20
|
+
const ui_extensions_dev_server_1 = require("@hubspot/ui-extensions-dev-server");
|
|
21
|
+
const portManager_1 = require("@hubspot/local-dev-lib/portManager");
|
|
22
|
+
const config_1 = require("@hubspot/local-dev-lib/config");
|
|
23
|
+
const AppDevModeInterface_1 = __importDefault(require("../localDev/AppDevModeInterface"));
|
|
24
|
+
const LocalDevState_1 = __importDefault(require("../localDev/LocalDevState"));
|
|
25
|
+
const LocalDevLogger_1 = __importDefault(require("../localDev/LocalDevLogger"));
|
|
26
|
+
const installAppPrompt_1 = require("../../prompts/installAppPrompt");
|
|
27
|
+
const promptUtils_1 = require("../../prompts/promptUtils");
|
|
28
|
+
const urls_1 = require("../../app/urls");
|
|
29
|
+
const accountTypes_1 = require("../../accountTypes");
|
|
30
|
+
const index_1 = require("../../errorHandlers/index");
|
|
31
|
+
const constants_1 = require("../../constants");
|
|
32
|
+
const environments_1 = require("@hubspot/local-dev-lib/constants/environments");
|
|
33
|
+
vitest_1.vi.mock('@hubspot/local-dev-lib/api/localDevAuth');
|
|
34
|
+
vitest_1.vi.mock('@hubspot/local-dev-lib/api/appsDev');
|
|
35
|
+
vitest_1.vi.mock('@hubspot/local-dev-lib/portManager');
|
|
36
|
+
vitest_1.vi.mock('@hubspot/local-dev-lib/config');
|
|
37
|
+
vitest_1.vi.mock('../../prompts/installAppPrompt');
|
|
38
|
+
vitest_1.vi.mock('../../prompts/promptUtils');
|
|
39
|
+
vitest_1.vi.mock('../../app/urls');
|
|
40
|
+
vitest_1.vi.mock('../../accountTypes');
|
|
41
|
+
vitest_1.vi.mock('../../ui/logger');
|
|
42
|
+
vitest_1.vi.mock('../../errorHandlers/index');
|
|
43
|
+
vitest_1.vi.mock('../localDev/LocalDevState');
|
|
44
|
+
vitest_1.vi.mock('../localDev/LocalDevLogger');
|
|
40
45
|
describe('AppDevModeInterface', () => {
|
|
41
46
|
let appDevModeInterface;
|
|
42
47
|
let mockLocalDevState;
|
|
@@ -54,13 +59,13 @@ describe('AppDevModeInterface', () => {
|
|
|
54
59
|
description: 'Test app description',
|
|
55
60
|
logo: 'logo.png',
|
|
56
61
|
auth: {
|
|
57
|
-
type: APP_AUTH_TYPES.STATIC,
|
|
62
|
+
type: constants_1.APP_AUTH_TYPES.STATIC,
|
|
58
63
|
requiredScopes: ['test-scope'],
|
|
59
64
|
optionalScopes: [],
|
|
60
65
|
conditionallyRequiredScopes: [],
|
|
61
66
|
redirectUrls: ['http://localhost:3000'],
|
|
62
67
|
},
|
|
63
|
-
distribution: APP_DISTRIBUTION_TYPES.PRIVATE,
|
|
68
|
+
distribution: constants_1.APP_DISTRIBUTION_TYPES.PRIVATE,
|
|
64
69
|
},
|
|
65
70
|
localDev: {
|
|
66
71
|
componentRoot: '/test/path',
|
|
@@ -75,7 +80,7 @@ describe('AppDevModeInterface', () => {
|
|
|
75
80
|
id: 123,
|
|
76
81
|
clientId: 'test-client-id',
|
|
77
82
|
name: 'Test App',
|
|
78
|
-
installationState: APP_INSTALLATION_STATES.NOT_INSTALLED,
|
|
83
|
+
installationState: constants_1.APP_INSTALLATION_STATES.NOT_INSTALLED,
|
|
79
84
|
scopeGroupIds: [1, 2, 3],
|
|
80
85
|
};
|
|
81
86
|
const mockPublicApp = {
|
|
@@ -86,61 +91,61 @@ describe('AppDevModeInterface', () => {
|
|
|
86
91
|
scopeGroupIds: [1, 2, 3],
|
|
87
92
|
};
|
|
88
93
|
beforeEach(() => {
|
|
89
|
-
vi.clearAllMocks();
|
|
94
|
+
vitest_1.vi.clearAllMocks();
|
|
90
95
|
mockLocalDevState = {
|
|
91
96
|
targetProjectAccountId: 12345,
|
|
92
97
|
targetTestingAccountId: 67890,
|
|
93
98
|
projectConfig: mockProjectConfig,
|
|
94
99
|
projectDir: '/test/project',
|
|
95
100
|
projectId: 999,
|
|
96
|
-
env: ENVIRONMENTS.PROD,
|
|
101
|
+
env: environments_1.ENVIRONMENTS.PROD,
|
|
97
102
|
projectNodes: { [mockAppNode.uid]: mockAppNode },
|
|
98
|
-
getAppDataByUid: vi.fn(),
|
|
99
|
-
setAppDataForUid: vi.fn(),
|
|
100
|
-
addListener: vi.fn(),
|
|
103
|
+
getAppDataByUid: vitest_1.vi.fn(),
|
|
104
|
+
setAppDataForUid: vitest_1.vi.fn(),
|
|
105
|
+
addListener: vitest_1.vi.fn(),
|
|
101
106
|
};
|
|
102
107
|
mockLocalDevLogger = {
|
|
103
|
-
addUploadWarning: vi.fn(),
|
|
108
|
+
addUploadWarning: vitest_1.vi.fn(),
|
|
104
109
|
};
|
|
105
110
|
// Mock constructors
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
LocalDevState_1.default.mockImplementation(() => mockLocalDevState);
|
|
112
|
+
LocalDevLogger_1.default.mockImplementation(() => mockLocalDevLogger);
|
|
108
113
|
// Mock external dependencies
|
|
109
|
-
fetchPublicAppsForPortal.mockResolvedValue({
|
|
114
|
+
appsDev_1.fetchPublicAppsForPortal.mockResolvedValue({
|
|
110
115
|
data: { results: [mockPublicApp] },
|
|
111
116
|
});
|
|
112
|
-
fetchPublicAppProductionInstallCounts.mockResolvedValue({
|
|
117
|
+
appsDev_1.fetchPublicAppProductionInstallCounts.mockResolvedValue({
|
|
113
118
|
data: { uniquePortalInstallCount: 5 },
|
|
114
119
|
});
|
|
115
|
-
fetchAppInstallationData.mockResolvedValue({
|
|
120
|
+
localDevAuth_1.fetchAppInstallationData.mockResolvedValue({
|
|
116
121
|
data: {
|
|
117
122
|
isInstalledWithScopeGroups: true,
|
|
118
123
|
previouslyAuthorizedScopeGroups: [],
|
|
119
124
|
},
|
|
120
125
|
});
|
|
121
|
-
getAccountConfig.mockReturnValue({
|
|
126
|
+
config_1.getAccountConfig.mockReturnValue({
|
|
122
127
|
parentAccountId: 12345,
|
|
123
128
|
});
|
|
124
|
-
isDeveloperTestAccount.mockReturnValue(true);
|
|
125
|
-
isSandbox.mockReturnValue(false);
|
|
126
|
-
getOauthAppInstallUrl.mockReturnValue('http://oauth-install-url');
|
|
127
|
-
getStaticAuthAppInstallUrl.mockReturnValue('http://static-install-url');
|
|
128
|
-
installAppAutoPrompt.mockResolvedValue(true);
|
|
129
|
-
installAppBrowserPrompt.mockResolvedValue(undefined);
|
|
130
|
-
confirmPrompt.mockResolvedValue(true);
|
|
131
|
-
installStaticAuthAppOnTestAccount.mockResolvedValue(undefined);
|
|
129
|
+
accountTypes_1.isDeveloperTestAccount.mockReturnValue(true);
|
|
130
|
+
accountTypes_1.isSandbox.mockReturnValue(false);
|
|
131
|
+
urls_1.getOauthAppInstallUrl.mockReturnValue('http://oauth-install-url');
|
|
132
|
+
urls_1.getStaticAuthAppInstallUrl.mockReturnValue('http://static-install-url');
|
|
133
|
+
installAppPrompt_1.installAppAutoPrompt.mockResolvedValue(true);
|
|
134
|
+
installAppPrompt_1.installAppBrowserPrompt.mockResolvedValue(undefined);
|
|
135
|
+
promptUtils_1.confirmPrompt.mockResolvedValue(true);
|
|
136
|
+
appsDev_1.installStaticAuthAppOnTestAccount.mockResolvedValue(undefined);
|
|
132
137
|
// Mock process.exit
|
|
133
|
-
vi.spyOn(global.process, 'exit').mockImplementation((code) => {
|
|
138
|
+
vitest_1.vi.spyOn(global.process, 'exit').mockImplementation((code) => {
|
|
134
139
|
throw new Error(`Process.exit called with code ${code}`);
|
|
135
140
|
});
|
|
136
|
-
appDevModeInterface = new
|
|
141
|
+
appDevModeInterface = new AppDevModeInterface_1.default({
|
|
137
142
|
localDevState: mockLocalDevState,
|
|
138
143
|
localDevLogger: mockLocalDevLogger,
|
|
139
144
|
});
|
|
140
145
|
});
|
|
141
146
|
describe('constructor', () => {
|
|
142
147
|
it('should initialize with valid state', () => {
|
|
143
|
-
expect(appDevModeInterface).toBeInstanceOf(
|
|
148
|
+
expect(appDevModeInterface).toBeInstanceOf(AppDevModeInterface_1.default);
|
|
144
149
|
expect(appDevModeInterface.localDevState).toBe(mockLocalDevState);
|
|
145
150
|
expect(appDevModeInterface.localDevLogger).toBe(mockLocalDevLogger);
|
|
146
151
|
});
|
|
@@ -150,7 +155,7 @@ describe('AppDevModeInterface', () => {
|
|
|
150
155
|
targetProjectAccountId: null,
|
|
151
156
|
};
|
|
152
157
|
expect(() => {
|
|
153
|
-
new
|
|
158
|
+
new AppDevModeInterface_1.default({
|
|
154
159
|
localDevState: mockLocalDevStateWithoutAccountId,
|
|
155
160
|
localDevLogger: mockLocalDevLogger,
|
|
156
161
|
});
|
|
@@ -162,7 +167,7 @@ describe('AppDevModeInterface', () => {
|
|
|
162
167
|
projectConfig: null,
|
|
163
168
|
};
|
|
164
169
|
expect(() => {
|
|
165
|
-
new
|
|
170
|
+
new AppDevModeInterface_1.default({
|
|
166
171
|
localDevState: mockLocalDevStateWithoutConfig,
|
|
167
172
|
localDevLogger: mockLocalDevLogger,
|
|
168
173
|
});
|
|
@@ -174,7 +179,7 @@ describe('AppDevModeInterface', () => {
|
|
|
174
179
|
projectDir: null,
|
|
175
180
|
};
|
|
176
181
|
expect(() => {
|
|
177
|
-
new
|
|
182
|
+
new AppDevModeInterface_1.default({
|
|
178
183
|
localDevState: mockLocalDevStateWithoutDir,
|
|
179
184
|
localDevLogger: mockLocalDevLogger,
|
|
180
185
|
});
|
|
@@ -188,29 +193,29 @@ describe('AppDevModeInterface', () => {
|
|
|
188
193
|
it('should return early if no app node exists', async () => {
|
|
189
194
|
mockLocalDevState.projectNodes = {};
|
|
190
195
|
await appDevModeInterface.setup({});
|
|
191
|
-
expect(fetchPublicAppsForPortal).not.toHaveBeenCalled();
|
|
192
|
-
expect(
|
|
196
|
+
expect(appsDev_1.fetchPublicAppsForPortal).not.toHaveBeenCalled();
|
|
197
|
+
expect(ui_extensions_dev_server_1.DevModeUnifiedInterface.setup).not.toHaveBeenCalled();
|
|
193
198
|
});
|
|
194
199
|
it('should setup successfully with private app', async () => {
|
|
195
200
|
await appDevModeInterface.setup({});
|
|
196
|
-
expect(fetchPublicAppsForPortal).toHaveBeenCalledWith(12345);
|
|
197
|
-
expect(fetchPublicAppProductionInstallCounts).toHaveBeenCalledWith(123, 12345);
|
|
198
|
-
expect(fetchAppInstallationData).toHaveBeenCalledWith(67890, 999, 'test-app-uid', ['test-scope'], []);
|
|
199
|
-
expect(
|
|
201
|
+
expect(appsDev_1.fetchPublicAppsForPortal).toHaveBeenCalledWith(12345);
|
|
202
|
+
expect(appsDev_1.fetchPublicAppProductionInstallCounts).toHaveBeenCalledWith(123, 12345);
|
|
203
|
+
expect(localDevAuth_1.fetchAppInstallationData).toHaveBeenCalledWith(67890, 999, 'test-app-uid', ['test-scope'], []);
|
|
204
|
+
expect(ui_extensions_dev_server_1.DevModeUnifiedInterface.setup).toHaveBeenCalled();
|
|
200
205
|
});
|
|
201
206
|
it('should show marketplace warning for marketplace apps', async () => {
|
|
202
207
|
const marketplaceAppNode = {
|
|
203
208
|
...mockAppNode,
|
|
204
209
|
config: {
|
|
205
210
|
...mockAppNode.config,
|
|
206
|
-
distribution: APP_DISTRIBUTION_TYPES.MARKETPLACE,
|
|
211
|
+
distribution: constants_1.APP_DISTRIBUTION_TYPES.MARKETPLACE,
|
|
207
212
|
},
|
|
208
213
|
};
|
|
209
214
|
mockLocalDevState.projectNodes = {
|
|
210
215
|
[marketplaceAppNode.uid]: marketplaceAppNode,
|
|
211
216
|
};
|
|
212
217
|
await appDevModeInterface.setup({});
|
|
213
|
-
expect(confirmPrompt).toHaveBeenCalled();
|
|
218
|
+
expect(promptUtils_1.confirmPrompt).toHaveBeenCalled();
|
|
214
219
|
expect(mockLocalDevLogger.addUploadWarning).toHaveBeenCalled();
|
|
215
220
|
});
|
|
216
221
|
it('should exit if user declines marketplace warning', async () => {
|
|
@@ -218,20 +223,20 @@ describe('AppDevModeInterface', () => {
|
|
|
218
223
|
...mockAppNode,
|
|
219
224
|
config: {
|
|
220
225
|
...mockAppNode.config,
|
|
221
|
-
distribution: APP_DISTRIBUTION_TYPES.MARKETPLACE,
|
|
226
|
+
distribution: constants_1.APP_DISTRIBUTION_TYPES.MARKETPLACE,
|
|
222
227
|
},
|
|
223
228
|
};
|
|
224
229
|
mockLocalDevState.projectNodes = {
|
|
225
230
|
[marketplaceAppNode.uid]: marketplaceAppNode,
|
|
226
231
|
};
|
|
227
232
|
// Set up conditions to trigger marketplace warning
|
|
228
|
-
fetchPublicAppProductionInstallCounts.mockResolvedValue({
|
|
233
|
+
appsDev_1.fetchPublicAppProductionInstallCounts.mockResolvedValue({
|
|
229
234
|
data: { uniquePortalInstallCount: 5 },
|
|
230
235
|
});
|
|
231
236
|
mockLocalDevState.getAppDataByUid.mockReturnValue(mockAppData);
|
|
232
|
-
confirmPrompt.mockResolvedValue(false);
|
|
237
|
+
promptUtils_1.confirmPrompt.mockResolvedValue(false);
|
|
233
238
|
// Create a new instance to trigger the exit during setup
|
|
234
|
-
const newAppDevModeInterface = new
|
|
239
|
+
const newAppDevModeInterface = new AppDevModeInterface_1.default({
|
|
235
240
|
localDevState: mockLocalDevState,
|
|
236
241
|
localDevLogger: mockLocalDevLogger,
|
|
237
242
|
});
|
|
@@ -240,14 +245,14 @@ describe('AppDevModeInterface', () => {
|
|
|
240
245
|
expect(process.exit).toHaveBeenCalledWith(0);
|
|
241
246
|
});
|
|
242
247
|
it('should auto-install static auth app on test account', async () => {
|
|
243
|
-
fetchAppInstallationData.mockResolvedValue({
|
|
248
|
+
localDevAuth_1.fetchAppInstallationData.mockResolvedValue({
|
|
244
249
|
data: {
|
|
245
250
|
isInstalledWithScopeGroups: false,
|
|
246
251
|
previouslyAuthorizedScopeGroups: [],
|
|
247
252
|
},
|
|
248
253
|
});
|
|
249
254
|
await appDevModeInterface.setup({});
|
|
250
|
-
expect(installStaticAuthAppOnTestAccount).toHaveBeenCalledWith(123, 67890, [1, 2, 3]);
|
|
255
|
+
expect(appsDev_1.installStaticAuthAppOnTestAccount).toHaveBeenCalledWith(123, 67890, [1, 2, 3]);
|
|
251
256
|
});
|
|
252
257
|
it('should open browser for OAuth app installation', async () => {
|
|
253
258
|
const oauthAppNode = {
|
|
@@ -256,50 +261,50 @@ describe('AppDevModeInterface', () => {
|
|
|
256
261
|
...mockAppNode.config,
|
|
257
262
|
auth: {
|
|
258
263
|
...mockAppNode.config.auth,
|
|
259
|
-
type: APP_AUTH_TYPES.OAUTH,
|
|
264
|
+
type: constants_1.APP_AUTH_TYPES.OAUTH,
|
|
260
265
|
},
|
|
261
266
|
},
|
|
262
267
|
};
|
|
263
268
|
mockLocalDevState.projectNodes = { [oauthAppNode.uid]: oauthAppNode };
|
|
264
|
-
fetchAppInstallationData.mockResolvedValue({
|
|
269
|
+
localDevAuth_1.fetchAppInstallationData.mockResolvedValue({
|
|
265
270
|
data: {
|
|
266
271
|
isInstalledWithScopeGroups: false,
|
|
267
272
|
previouslyAuthorizedScopeGroups: [],
|
|
268
273
|
},
|
|
269
274
|
});
|
|
270
275
|
await appDevModeInterface.setup({});
|
|
271
|
-
expect(getOauthAppInstallUrl).toHaveBeenCalledWith({
|
|
276
|
+
expect(urls_1.getOauthAppInstallUrl).toHaveBeenCalledWith({
|
|
272
277
|
targetAccountId: 67890,
|
|
273
|
-
env: ENVIRONMENTS.PROD,
|
|
278
|
+
env: environments_1.ENVIRONMENTS.PROD,
|
|
274
279
|
clientId: 'test-client-id',
|
|
275
280
|
scopes: ['test-scope'],
|
|
276
281
|
redirectUrls: ['http://localhost:3000'],
|
|
277
282
|
});
|
|
278
|
-
expect(installAppBrowserPrompt).toHaveBeenCalled();
|
|
283
|
+
expect(installAppPrompt_1.installAppBrowserPrompt).toHaveBeenCalled();
|
|
279
284
|
});
|
|
280
285
|
it('should handle app reinstallation', async () => {
|
|
281
286
|
// Set up conditions for non-automatic installation
|
|
282
|
-
getAccountConfig.mockReturnValue(null);
|
|
283
|
-
fetchAppInstallationData.mockResolvedValue({
|
|
287
|
+
config_1.getAccountConfig.mockReturnValue(null);
|
|
288
|
+
localDevAuth_1.fetchAppInstallationData.mockResolvedValue({
|
|
284
289
|
data: {
|
|
285
290
|
isInstalledWithScopeGroups: false,
|
|
286
291
|
previouslyAuthorizedScopeGroups: ['old-scope'],
|
|
287
292
|
},
|
|
288
293
|
});
|
|
289
294
|
await appDevModeInterface.setup({});
|
|
290
|
-
expect(installAppBrowserPrompt).toHaveBeenCalledWith('http://static-install-url', true);
|
|
295
|
+
expect(installAppPrompt_1.installAppBrowserPrompt).toHaveBeenCalledWith('http://static-install-url', true);
|
|
291
296
|
});
|
|
292
297
|
it('should handle errors during setup', async () => {
|
|
293
298
|
const error = new Error('Setup failed');
|
|
294
|
-
fetchPublicAppsForPortal.mockRejectedValue(error);
|
|
299
|
+
appsDev_1.fetchPublicAppsForPortal.mockRejectedValue(error);
|
|
295
300
|
await appDevModeInterface.setup({});
|
|
296
|
-
expect(logError).toHaveBeenCalledWith(error);
|
|
301
|
+
expect(index_1.logError).toHaveBeenCalledWith(error);
|
|
297
302
|
});
|
|
298
303
|
it('should exit if app not found in portal', async () => {
|
|
299
304
|
// Set up conditions for non-automatic installation to force getAppInstallUrl call
|
|
300
|
-
getAccountConfig.mockReturnValue(null);
|
|
305
|
+
config_1.getAccountConfig.mockReturnValue(null);
|
|
301
306
|
// First call for fetchAppData succeeds
|
|
302
|
-
fetchPublicAppsForPortal
|
|
307
|
+
appsDev_1.fetchPublicAppsForPortal
|
|
303
308
|
.mockResolvedValueOnce({
|
|
304
309
|
data: { results: [mockPublicApp] },
|
|
305
310
|
})
|
|
@@ -307,7 +312,7 @@ describe('AppDevModeInterface', () => {
|
|
|
307
312
|
.mockResolvedValueOnce({
|
|
308
313
|
data: { results: [] },
|
|
309
314
|
});
|
|
310
|
-
fetchAppInstallationData.mockResolvedValue({
|
|
315
|
+
localDevAuth_1.fetchAppInstallationData.mockResolvedValue({
|
|
311
316
|
data: {
|
|
312
317
|
isInstalledWithScopeGroups: false,
|
|
313
318
|
previouslyAuthorizedScopeGroups: [],
|
|
@@ -319,19 +324,19 @@ describe('AppDevModeInterface', () => {
|
|
|
319
324
|
});
|
|
320
325
|
it('should exit if user declines auto-install', async () => {
|
|
321
326
|
// Set up conditions for automatic installation
|
|
322
|
-
getAccountConfig.mockReturnValue({
|
|
327
|
+
config_1.getAccountConfig.mockReturnValue({
|
|
323
328
|
parentAccountId: 12345, // matches targetProjectAccountId
|
|
324
329
|
});
|
|
325
|
-
isDeveloperTestAccount.mockReturnValue(true);
|
|
326
|
-
fetchAppInstallationData.mockResolvedValue({
|
|
330
|
+
accountTypes_1.isDeveloperTestAccount.mockReturnValue(true);
|
|
331
|
+
localDevAuth_1.fetchAppInstallationData.mockResolvedValue({
|
|
327
332
|
data: {
|
|
328
333
|
isInstalledWithScopeGroups: false,
|
|
329
334
|
previouslyAuthorizedScopeGroups: [],
|
|
330
335
|
},
|
|
331
336
|
});
|
|
332
|
-
installAppAutoPrompt.mockResolvedValue(false);
|
|
337
|
+
installAppPrompt_1.installAppAutoPrompt.mockResolvedValue(false);
|
|
333
338
|
// Create a new instance to trigger the exit during setup
|
|
334
|
-
const newAppDevModeInterface = new
|
|
339
|
+
const newAppDevModeInterface = new AppDevModeInterface_1.default({
|
|
335
340
|
localDevState: mockLocalDevState,
|
|
336
341
|
localDevLogger: mockLocalDevLogger,
|
|
337
342
|
});
|
|
@@ -340,29 +345,29 @@ describe('AppDevModeInterface', () => {
|
|
|
340
345
|
expect(process.exit).toHaveBeenCalledWith(0);
|
|
341
346
|
});
|
|
342
347
|
it('should fallback to browser install if auto-install fails', async () => {
|
|
343
|
-
fetchAppInstallationData.mockResolvedValue({
|
|
348
|
+
localDevAuth_1.fetchAppInstallationData.mockResolvedValue({
|
|
344
349
|
data: {
|
|
345
350
|
isInstalledWithScopeGroups: false,
|
|
346
351
|
previouslyAuthorizedScopeGroups: [],
|
|
347
352
|
},
|
|
348
353
|
});
|
|
349
|
-
installStaticAuthAppOnTestAccount.mockRejectedValue(new Error('Install failed'));
|
|
354
|
+
appsDev_1.installStaticAuthAppOnTestAccount.mockRejectedValue(new Error('Install failed'));
|
|
350
355
|
await appDevModeInterface.setup({});
|
|
351
|
-
expect(installAppBrowserPrompt).toHaveBeenCalledWith('http://static-install-url', false);
|
|
356
|
+
expect(installAppPrompt_1.installAppBrowserPrompt).toHaveBeenCalledWith('http://static-install-url', false);
|
|
352
357
|
});
|
|
353
358
|
});
|
|
354
359
|
describe('start()', () => {
|
|
355
360
|
it('should return early if no app node exists', async () => {
|
|
356
361
|
mockLocalDevState.projectNodes = {};
|
|
357
362
|
await appDevModeInterface.start();
|
|
358
|
-
expect(
|
|
363
|
+
expect(ui_extensions_dev_server_1.DevModeUnifiedInterface.start).not.toHaveBeenCalled();
|
|
359
364
|
});
|
|
360
365
|
it('should start UIE dev mode interface', async () => {
|
|
361
366
|
await appDevModeInterface.start();
|
|
362
|
-
expect(
|
|
367
|
+
expect(ui_extensions_dev_server_1.DevModeUnifiedInterface.start).toHaveBeenCalledWith({
|
|
363
368
|
accountId: 67890,
|
|
364
369
|
projectConfig: mockProjectConfig,
|
|
365
|
-
requestPorts,
|
|
370
|
+
requestPorts: portManager_1.requestPorts,
|
|
366
371
|
});
|
|
367
372
|
});
|
|
368
373
|
});
|
|
@@ -370,22 +375,22 @@ describe('AppDevModeInterface', () => {
|
|
|
370
375
|
it('should return early if no app node exists', async () => {
|
|
371
376
|
mockLocalDevState.projectNodes = {};
|
|
372
377
|
await appDevModeInterface.fileChange('test.js', 'change');
|
|
373
|
-
expect(
|
|
378
|
+
expect(ui_extensions_dev_server_1.DevModeUnifiedInterface.fileChange).not.toHaveBeenCalled();
|
|
374
379
|
});
|
|
375
380
|
it('should forward file change to UIE dev mode interface', async () => {
|
|
376
381
|
await appDevModeInterface.fileChange('test.js', 'change');
|
|
377
|
-
expect(
|
|
382
|
+
expect(ui_extensions_dev_server_1.DevModeUnifiedInterface.fileChange).toHaveBeenCalledWith('test.js', 'change');
|
|
378
383
|
});
|
|
379
384
|
});
|
|
380
385
|
describe('cleanup()', () => {
|
|
381
386
|
it('should return early if no app node exists', async () => {
|
|
382
387
|
mockLocalDevState.projectNodes = {};
|
|
383
388
|
await appDevModeInterface.cleanup();
|
|
384
|
-
expect(
|
|
389
|
+
expect(ui_extensions_dev_server_1.DevModeUnifiedInterface.cleanup).not.toHaveBeenCalled();
|
|
385
390
|
});
|
|
386
391
|
it('should cleanup UIE dev mode interface', async () => {
|
|
387
392
|
await appDevModeInterface.cleanup();
|
|
388
|
-
expect(
|
|
393
|
+
expect(ui_extensions_dev_server_1.DevModeUnifiedInterface.cleanup).toHaveBeenCalled();
|
|
389
394
|
});
|
|
390
395
|
});
|
|
391
396
|
describe('isAutomaticallyInstallable()', () => {
|
|
@@ -395,106 +400,106 @@ describe('AppDevModeInterface', () => {
|
|
|
395
400
|
});
|
|
396
401
|
it('should return false if target account config is missing', async () => {
|
|
397
402
|
// Reset mocks to ensure clean state
|
|
398
|
-
vi.clearAllMocks();
|
|
403
|
+
vitest_1.vi.clearAllMocks();
|
|
399
404
|
// Set up basic mocks
|
|
400
|
-
fetchPublicAppsForPortal.mockResolvedValue({
|
|
405
|
+
appsDev_1.fetchPublicAppsForPortal.mockResolvedValue({
|
|
401
406
|
data: { results: [mockPublicApp] },
|
|
402
407
|
});
|
|
403
|
-
fetchPublicAppProductionInstallCounts.mockResolvedValue({
|
|
408
|
+
appsDev_1.fetchPublicAppProductionInstallCounts.mockResolvedValue({
|
|
404
409
|
data: { uniquePortalInstallCount: 5 },
|
|
405
410
|
});
|
|
406
|
-
getStaticAuthAppInstallUrl.mockReturnValue('http://static-install-url');
|
|
407
|
-
installAppBrowserPrompt.mockResolvedValue(undefined);
|
|
411
|
+
urls_1.getStaticAuthAppInstallUrl.mockReturnValue('http://static-install-url');
|
|
412
|
+
installAppPrompt_1.installAppBrowserPrompt.mockResolvedValue(undefined);
|
|
408
413
|
// Reset the mock LocalDevState
|
|
409
|
-
mockLocalDevState.getAppDataByUid = vi.fn().mockReturnValue(mockAppData);
|
|
410
|
-
mockLocalDevState.setAppDataForUid = vi.fn();
|
|
411
|
-
mockLocalDevState.addListener = vi.fn();
|
|
414
|
+
mockLocalDevState.getAppDataByUid = vitest_1.vi.fn().mockReturnValue(mockAppData);
|
|
415
|
+
mockLocalDevState.setAppDataForUid = vitest_1.vi.fn();
|
|
416
|
+
mockLocalDevState.addListener = vitest_1.vi.fn();
|
|
412
417
|
// Target account config is missing
|
|
413
|
-
getAccountConfig.mockReturnValue(null);
|
|
418
|
+
config_1.getAccountConfig.mockReturnValue(null);
|
|
414
419
|
// App is not installed
|
|
415
|
-
fetchAppInstallationData.mockResolvedValue({
|
|
420
|
+
localDevAuth_1.fetchAppInstallationData.mockResolvedValue({
|
|
416
421
|
data: {
|
|
417
422
|
isInstalledWithScopeGroups: false,
|
|
418
423
|
previouslyAuthorizedScopeGroups: [],
|
|
419
424
|
},
|
|
420
425
|
});
|
|
421
426
|
// Create a new instance to avoid interference from previous test setup
|
|
422
|
-
const newAppDevModeInterface = new
|
|
427
|
+
const newAppDevModeInterface = new AppDevModeInterface_1.default({
|
|
423
428
|
localDevState: mockLocalDevState,
|
|
424
429
|
localDevLogger: mockLocalDevLogger,
|
|
425
430
|
});
|
|
426
431
|
await newAppDevModeInterface.setup({});
|
|
427
|
-
expect(installAppBrowserPrompt).toHaveBeenCalled();
|
|
432
|
+
expect(installAppPrompt_1.installAppBrowserPrompt).toHaveBeenCalled();
|
|
428
433
|
});
|
|
429
434
|
it('should return false for OAuth app', async () => {
|
|
430
435
|
// Reset mocks to ensure clean state
|
|
431
|
-
vi.clearAllMocks();
|
|
436
|
+
vitest_1.vi.clearAllMocks();
|
|
432
437
|
// Set up basic mocks
|
|
433
|
-
fetchPublicAppsForPortal.mockResolvedValue({
|
|
438
|
+
appsDev_1.fetchPublicAppsForPortal.mockResolvedValue({
|
|
434
439
|
data: { results: [mockPublicApp] },
|
|
435
440
|
});
|
|
436
|
-
fetchPublicAppProductionInstallCounts.mockResolvedValue({
|
|
441
|
+
appsDev_1.fetchPublicAppProductionInstallCounts.mockResolvedValue({
|
|
437
442
|
data: { uniquePortalInstallCount: 5 },
|
|
438
443
|
});
|
|
439
|
-
getOauthAppInstallUrl.mockReturnValue('http://oauth-install-url');
|
|
440
|
-
installAppBrowserPrompt.mockResolvedValue(undefined);
|
|
444
|
+
urls_1.getOauthAppInstallUrl.mockReturnValue('http://oauth-install-url');
|
|
445
|
+
installAppPrompt_1.installAppBrowserPrompt.mockResolvedValue(undefined);
|
|
441
446
|
// Reset the mock LocalDevState
|
|
442
|
-
mockLocalDevState.getAppDataByUid = vi.fn().mockReturnValue(mockAppData);
|
|
443
|
-
mockLocalDevState.setAppDataForUid = vi.fn();
|
|
444
|
-
mockLocalDevState.addListener = vi.fn();
|
|
447
|
+
mockLocalDevState.getAppDataByUid = vitest_1.vi.fn().mockReturnValue(mockAppData);
|
|
448
|
+
mockLocalDevState.setAppDataForUid = vitest_1.vi.fn();
|
|
449
|
+
mockLocalDevState.addListener = vitest_1.vi.fn();
|
|
445
450
|
const oauthAppNode = {
|
|
446
451
|
...mockAppNode,
|
|
447
452
|
config: {
|
|
448
453
|
...mockAppNode.config,
|
|
449
454
|
auth: {
|
|
450
455
|
...mockAppNode.config.auth,
|
|
451
|
-
type: APP_AUTH_TYPES.OAUTH,
|
|
456
|
+
type: constants_1.APP_AUTH_TYPES.OAUTH,
|
|
452
457
|
},
|
|
453
458
|
},
|
|
454
459
|
};
|
|
455
460
|
mockLocalDevState.projectNodes = { [oauthAppNode.uid]: oauthAppNode };
|
|
456
461
|
// App is not installed
|
|
457
|
-
fetchAppInstallationData.mockResolvedValue({
|
|
462
|
+
localDevAuth_1.fetchAppInstallationData.mockResolvedValue({
|
|
458
463
|
data: {
|
|
459
464
|
isInstalledWithScopeGroups: false,
|
|
460
465
|
previouslyAuthorizedScopeGroups: [],
|
|
461
466
|
},
|
|
462
467
|
});
|
|
463
468
|
// Create a new instance to avoid interference from previous test setup
|
|
464
|
-
const newAppDevModeInterface = new
|
|
469
|
+
const newAppDevModeInterface = new AppDevModeInterface_1.default({
|
|
465
470
|
localDevState: mockLocalDevState,
|
|
466
471
|
localDevLogger: mockLocalDevLogger,
|
|
467
472
|
});
|
|
468
473
|
await newAppDevModeInterface.setup({});
|
|
469
|
-
expect(installAppBrowserPrompt).toHaveBeenCalled();
|
|
474
|
+
expect(installAppPrompt_1.installAppBrowserPrompt).toHaveBeenCalled();
|
|
470
475
|
});
|
|
471
476
|
});
|
|
472
477
|
describe('websocket server message handling', () => {
|
|
473
478
|
it('should check app installation when websocket server connects', async () => {
|
|
474
479
|
// Reset mocks to ensure clean state
|
|
475
|
-
vi.clearAllMocks();
|
|
480
|
+
vitest_1.vi.clearAllMocks();
|
|
476
481
|
// Set up basic mocks
|
|
477
|
-
fetchPublicAppsForPortal.mockResolvedValue({
|
|
482
|
+
appsDev_1.fetchPublicAppsForPortal.mockResolvedValue({
|
|
478
483
|
data: { results: [mockPublicApp] },
|
|
479
484
|
});
|
|
480
|
-
fetchPublicAppProductionInstallCounts.mockResolvedValue({
|
|
485
|
+
appsDev_1.fetchPublicAppProductionInstallCounts.mockResolvedValue({
|
|
481
486
|
data: { uniquePortalInstallCount: 5 },
|
|
482
487
|
});
|
|
483
|
-
getStaticAuthAppInstallUrl.mockReturnValue('http://static-install-url');
|
|
484
|
-
installAppBrowserPrompt.mockResolvedValue(undefined);
|
|
488
|
+
urls_1.getStaticAuthAppInstallUrl.mockReturnValue('http://static-install-url');
|
|
489
|
+
installAppPrompt_1.installAppBrowserPrompt.mockResolvedValue(undefined);
|
|
485
490
|
// Reset the mock LocalDevState
|
|
486
|
-
mockLocalDevState.getAppDataByUid = vi.fn().mockReturnValue(mockAppData);
|
|
487
|
-
mockLocalDevState.setAppDataForUid = vi.fn();
|
|
488
|
-
mockLocalDevState.addListener = vi.fn();
|
|
491
|
+
mockLocalDevState.getAppDataByUid = vitest_1.vi.fn().mockReturnValue(mockAppData);
|
|
492
|
+
mockLocalDevState.setAppDataForUid = vitest_1.vi.fn();
|
|
493
|
+
mockLocalDevState.addListener = vitest_1.vi.fn();
|
|
489
494
|
// App is not installed so fetchAppInstallationData will be called
|
|
490
|
-
fetchAppInstallationData.mockResolvedValue({
|
|
495
|
+
localDevAuth_1.fetchAppInstallationData.mockResolvedValue({
|
|
491
496
|
data: {
|
|
492
497
|
isInstalledWithScopeGroups: false,
|
|
493
498
|
previouslyAuthorizedScopeGroups: [],
|
|
494
499
|
},
|
|
495
500
|
});
|
|
496
501
|
// Create a new instance to avoid interference from previous test setup
|
|
497
|
-
const newAppDevModeInterface = new
|
|
502
|
+
const newAppDevModeInterface = new AppDevModeInterface_1.default({
|
|
498
503
|
localDevState: mockLocalDevState,
|
|
499
504
|
localDevLogger: mockLocalDevLogger,
|
|
500
505
|
});
|
|
@@ -505,8 +510,8 @@ describe('AppDevModeInterface', () => {
|
|
|
505
510
|
const [eventType, callback] = addListenerCall;
|
|
506
511
|
expect(eventType).toBe('devServerMessage');
|
|
507
512
|
// Call the callback with websocket connection message
|
|
508
|
-
await callback(LOCAL_DEV_SERVER_MESSAGE_TYPES.WEBSOCKET_SERVER_CONNECTED);
|
|
509
|
-
expect(fetchAppInstallationData).toHaveBeenCalledTimes(2); // Once in setup, once in listener
|
|
513
|
+
await callback(constants_1.LOCAL_DEV_SERVER_MESSAGE_TYPES.WEBSOCKET_SERVER_CONNECTED);
|
|
514
|
+
expect(localDevAuth_1.fetchAppInstallationData).toHaveBeenCalledTimes(2); // Once in setup, once in listener
|
|
510
515
|
});
|
|
511
516
|
});
|
|
512
517
|
});
|