diff --git a/cmd/app/add_test.go b/cmd/app/add_test.go index 4a019f9e..6f06597e 100644 --- a/cmd/app/add_test.go +++ b/cmd/app/add_test.go @@ -103,7 +103,7 @@ func TestAppAddCommandPreRun(t *testing.T) { Setup: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock, cf *shared.ClientFactory) { cf.SDKConfig.WorkingDirectory = "." cm.AddDefaultMocks() - cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, experiment.BoltFrameworks) + cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, string(experiment.BoltFrameworks)) cm.Config.LoadExperiments(ctx, cm.IO.PrintDebug) mockProjectConfig := config.NewProjectConfigMock() mockProjectConfig.On("GetManifestSource", mock.Anything).Return(config.ManifestSourceRemote, nil) @@ -115,7 +115,7 @@ func TestAppAddCommandPreRun(t *testing.T) { Setup: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock, cf *shared.ClientFactory) { cf.SDKConfig.WorkingDirectory = "." cm.AddDefaultMocks() - cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, experiment.BoltFrameworks) + cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, string(experiment.BoltFrameworks)) cm.Config.LoadExperiments(ctx, cm.IO.PrintDebug) mockProjectConfig := config.NewProjectConfigMock() mockProjectConfig.On("GetManifestSource", mock.Anything).Return(config.ManifestSourceLocal, nil) diff --git a/cmd/manifest/info_test.go b/cmd/manifest/info_test.go index 5181f388..48b8b451 100644 --- a/cmd/manifest/info_test.go +++ b/cmd/manifest/info_test.go @@ -133,7 +133,7 @@ func TestInfoCommand(t *testing.T) { }, }, nil) cf.AppClient().Manifest = manifestMock - cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, experiment.BoltFrameworks) + cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, string(experiment.BoltFrameworks)) cm.Config.LoadExperiments(ctx, cm.IO.PrintDebug) mockProjectConfig := config.NewProjectConfigMock() mockProjectConfig.On("GetManifestSource", mock.Anything).Return(config.ManifestSourceLocal, nil) @@ -162,7 +162,7 @@ func TestInfoCommand(t *testing.T) { cf.SDKConfig.WorkingDirectory = "." cm.IO.AddDefaultMocks() cm.Os.AddDefaultMocks() - cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, experiment.BoltFrameworks) + cm.Config.ExperimentsFlag = append(cm.Config.ExperimentsFlag, string(experiment.BoltFrameworks)) cm.Config.LoadExperiments(ctx, cm.IO.PrintDebug) mockProjectConfig := config.NewProjectConfigMock() mockProjectConfig.On("GetManifestSource", mock.Anything). diff --git a/docs/guides/using-slack-cli-with-bolt-frameworks.md b/docs/guides/using-slack-cli-with-bolt-frameworks.md index e238f92c..1b342795 100644 --- a/docs/guides/using-slack-cli-with-bolt-frameworks.md +++ b/docs/guides/using-slack-cli-with-bolt-frameworks.md @@ -26,7 +26,7 @@ View more samples You will then be prompted to choose between **Bolt for JavaScript** or **Bolt for Python**. Choose your favorite flavor. -Your app will be cloned from the respective [JavaScript](https://github.com/slack-samples/bolt-js-starter-template) or [Python](https://github.com/slack-samples/bolt-python-starter-template) project template on our Slack Platform Sample Code repository, and its project dependencies will be installed. Then, `cd` into your project folder. +Your app will be cloned from the respective [JavaScript](https://github.com/slack-samples/bolt-js-starter-template) or [Python](https://github.com/slack-samples/bolt-python-starter-template) project template on our Slack Platform Sample Code repository, and its project dependencies will be installed. Then, `cd` into your project folder. :::info @@ -34,10 +34,10 @@ For Bolt for Python projects, automatic project dependency installation is curre ::: -To run your new app, use the `slack run` command with the experiment flag as follows: +To run your new app, use the `slack run` command as follows: ``` slack run ``` -You'll be prompted to choose your team/workspace, and then your app should let you know that it's up and running. 🎉 \ No newline at end of file +You'll be prompted to choose your team/workspace, and then your app should let you know that it's up and running. 🎉 diff --git a/docs/reference/experiments.md b/docs/reference/experiments.md index d758bc2f..8d2a97be 100644 --- a/docs/reference/experiments.md +++ b/docs/reference/experiments.md @@ -6,4 +6,5 @@ The Slack CLI has an experiment flag, behind which we put features under develop The following is a list of currently available experiments. We may remove an experiment once the feature is released. -* `read-only-collaborators`: enables creating and modifying collaborator permissions via the `slack collaborator` commands. \ No newline at end of file +* `bolt-install`: enables creating, installing, and running Bolt projects that manage their app manifest on app settings (remote manifest). +* `read-only-collaborators`: enables creating and modifying collaborator permissions via the `slack collaborator` commands. diff --git a/internal/experiment/experiment.go b/internal/experiment/experiment.go index 63de5e30..1f8708ad 100644 --- a/internal/experiment/experiment.go +++ b/internal/experiment/experiment.go @@ -32,7 +32,11 @@ type Experiment string const ( // BoltFrameworks experiment adds CLI support for Bolt JavaScript & Bolt Python. // These frameworks will be introducing remote function support. - BoltFrameworks = "bolt" + BoltFrameworks Experiment = "bolt" + + // BoltInstall experiment enables developerInstall to work with Bolt projects that + // manage their app manifest on app settings (remote manifest). + BoltInstall Experiment = "bolt-install" // The ReadOnlyAppCollaborators experiment enables creating and modifying collaborator // permissions via the `collaborator` commands. @@ -46,6 +50,7 @@ const ( // AllExperiment is a list of all available experiments that can be enabled var AllExperiments = []Experiment{ BoltFrameworks, + BoltInstall, ReadOnlyAppCollaborators, Placeholder, } diff --git a/internal/pkg/apps/install_test.go b/internal/pkg/apps/install_test.go index 669e8935..68a97dad 100644 --- a/internal/pkg/apps/install_test.go +++ b/internal/pkg/apps/install_test.go @@ -539,7 +539,7 @@ func TestInstall(t *testing.T) { clientsMock.AppClient.Manifest = manifestMock mockProjectConfig := config.NewProjectConfigMock() if tt.mockBoltExperiment { - clientsMock.Config.ExperimentsFlag = append(clientsMock.Config.ExperimentsFlag, experiment.BoltFrameworks) + clientsMock.Config.ExperimentsFlag = append(clientsMock.Config.ExperimentsFlag, string(experiment.BoltFrameworks)) clientsMock.Config.LoadExperiments(ctx, clientsMock.IO.PrintDebug) mockProjectConfig.On("GetManifestSource", mock.Anything).Return(tt.mockManifestSource, nil) } @@ -982,7 +982,7 @@ func TestInstallLocalApp(t *testing.T) { clientsMock.AppClient.Manifest = manifestMock mockProjectConfig := config.NewProjectConfigMock() if tt.mockBoltExperiment { - clientsMock.Config.ExperimentsFlag = append(clientsMock.Config.ExperimentsFlag, experiment.BoltFrameworks) + clientsMock.Config.ExperimentsFlag = append(clientsMock.Config.ExperimentsFlag, string(experiment.BoltFrameworks)) clientsMock.Config.LoadExperiments(ctx, clientsMock.IO.PrintDebug) mockProjectConfig.On("GetManifestSource", mock.Anything).Return(tt.mockManifestSource, nil) }