clever-tools 4.4.0 → 4.5.0
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/bin/clever.js +208 -2128
- package/package.json +33 -25
- package/src/clever-client/auth-bridge.js +0 -9
- package/src/clever-client/drains.js +0 -17
- package/src/clever-client/operators.js +1 -1
- package/src/commands/README.md +65 -0
- package/src/commands/accesslogs/accesslogs.command.js +158 -0
- package/src/commands/accesslogs/accesslogs.docs.md +20 -0
- package/src/commands/{activity.js → activity/activity.command.js} +74 -44
- package/src/commands/activity/activity.docs.md +19 -0
- package/src/commands/addon/addon.args.js +14 -0
- package/src/commands/addon/addon.command.js +7 -0
- package/src/commands/addon/addon.create.command.js +236 -0
- package/src/commands/addon/addon.delete.command.js +32 -0
- package/src/commands/addon/addon.docs.md +156 -0
- package/src/commands/addon/addon.env.command.js +50 -0
- package/src/commands/addon/addon.list.command.js +55 -0
- package/src/commands/addon/addon.providers.command.js +45 -0
- package/src/commands/addon/addon.providers.show.command.js +99 -0
- package/src/commands/addon/addon.rename.command.js +24 -0
- package/src/commands/applications/applications.command.js +59 -0
- package/src/commands/applications/applications.docs.md +31 -0
- package/src/commands/applications/applications.list.command.js +100 -0
- package/src/commands/cancel-deploy/cancel-deploy.command.js +30 -0
- package/src/commands/cancel-deploy/cancel-deploy.docs.md +16 -0
- package/src/commands/config/config.args.js +10 -0
- package/src/commands/config/config.command.js +20 -0
- package/src/commands/config/config.docs.md +86 -0
- package/src/commands/config/config.get.command.js +21 -0
- package/src/commands/config/config.set.command.js +38 -0
- package/src/commands/config/config.update.command.js +88 -0
- package/src/commands/console/console.command.js +31 -0
- package/src/commands/console/console.docs.md +16 -0
- package/src/commands/create/create.command.js +173 -0
- package/src/commands/create/create.docs.md +27 -0
- package/src/commands/{curl.js → curl/curl.command.js} +10 -3
- package/src/commands/curl/curl.docs.md +9 -0
- package/src/commands/database/database.args.js +8 -0
- package/src/commands/database/database.backups.command.js +60 -0
- package/src/commands/database/database.backups.download.command.js +55 -0
- package/src/commands/database/database.command.js +10 -0
- package/src/commands/database/database.docs.md +52 -0
- package/src/commands/delete/delete.command.js +43 -0
- package/src/commands/delete/delete.docs.md +17 -0
- package/src/commands/deploy/deploy.command.js +166 -0
- package/src/commands/deploy/deploy.docs.md +22 -0
- package/src/commands/diag/diag.command.js +136 -0
- package/src/commands/diag/diag.docs.md +15 -0
- package/src/commands/domain/domain.add.command.js +25 -0
- package/src/commands/domain/domain.args.js +8 -0
- package/src/commands/domain/domain.command.js +38 -0
- package/src/commands/domain/domain.diag.command.js +204 -0
- package/src/commands/domain/domain.docs.md +143 -0
- package/src/commands/domain/domain.favourite.command.js +35 -0
- package/src/commands/domain/domain.favourite.set.command.js +24 -0
- package/src/commands/domain/domain.favourite.unset.command.js +23 -0
- package/src/commands/domain/domain.overview.command.js +157 -0
- package/src/commands/domain/domain.rm.command.js +25 -0
- package/src/commands/drain/drain.args.js +8 -0
- package/src/commands/drain/drain.command.js +56 -0
- package/src/commands/drain/drain.create.command.js +128 -0
- package/src/commands/drain/drain.disable.command.js +27 -0
- package/src/commands/drain/drain.docs.md +129 -0
- package/src/commands/drain/drain.enable.command.js +27 -0
- package/src/commands/drain/drain.get.command.js +38 -0
- package/src/commands/drain/drain.remove.command.js +26 -0
- package/src/commands/emails/emails.add.command.js +32 -0
- package/src/commands/emails/emails.args.js +8 -0
- package/src/commands/emails/emails.command.js +35 -0
- package/src/commands/emails/emails.docs.md +79 -0
- package/src/commands/emails/emails.open.command.js +15 -0
- package/src/commands/emails/emails.primary.command.js +29 -0
- package/src/commands/emails/emails.remove-all.command.js +54 -0
- package/src/commands/emails/emails.remove.command.js +25 -0
- package/src/commands/env/env.command.js +77 -0
- package/src/commands/env/env.docs.md +99 -0
- package/src/commands/env/env.import-vars.command.js +45 -0
- package/src/commands/env/env.import.command.js +29 -0
- package/src/commands/env/env.rm.command.js +25 -0
- package/src/commands/env/env.set.command.js +32 -0
- package/src/commands/features/features.args.js +9 -0
- package/src/commands/features/features.command.js +7 -0
- package/src/commands/features/features.disable.command.js +25 -0
- package/src/commands/features/features.docs.md +71 -0
- package/src/commands/features/features.enable.command.js +32 -0
- package/src/commands/features/features.info.command.js +27 -0
- package/src/commands/features/features.list.command.js +49 -0
- package/src/commands/global.args.js +45 -0
- package/src/commands/global.commands.js +461 -0
- package/src/commands/global.options.js +186 -0
- package/src/commands/help/help.command.js +9 -0
- package/src/commands/help/help.docs.md +9 -0
- package/src/commands/k8s/k8s.add-persistent-storage.command.js +39 -0
- package/src/commands/k8s/k8s.args.js +9 -0
- package/src/commands/k8s/k8s.command.js +12 -0
- package/src/commands/k8s/k8s.create.command.js +86 -0
- package/src/commands/k8s/k8s.delete.command.js +40 -0
- package/src/commands/k8s/k8s.docs.md +131 -0
- package/src/commands/k8s/k8s.get-kubeconfig.command.js +32 -0
- package/src/commands/k8s/k8s.get.command.js +43 -0
- package/src/commands/k8s/k8s.list.command.js +38 -0
- package/src/commands/keycloak/keycloak.command.js +17 -0
- package/src/commands/keycloak/keycloak.disable-ng.command.js +13 -0
- package/src/commands/keycloak/keycloak.docs.md +197 -0
- package/src/commands/keycloak/keycloak.enable-ng.command.js +13 -0
- package/src/commands/keycloak/keycloak.get.command.js +17 -0
- package/src/commands/keycloak/keycloak.open.command.js +13 -0
- package/src/commands/keycloak/keycloak.open.logs.command.js +13 -0
- package/src/commands/keycloak/keycloak.open.webui.command.js +13 -0
- package/src/commands/keycloak/keycloak.rebuild.command.js +13 -0
- package/src/commands/keycloak/keycloak.restart.command.js +13 -0
- package/src/commands/keycloak/keycloak.version.check.command.js +17 -0
- package/src/commands/keycloak/keycloak.version.command.js +17 -0
- package/src/commands/keycloak/keycloak.version.update.command.js +17 -0
- package/src/commands/kv/kv.command.js +99 -0
- package/src/commands/kv/kv.docs.md +27 -0
- package/src/commands/link/link.command.js +31 -0
- package/src/commands/link/link.docs.md +22 -0
- package/src/commands/{login.js → login/login.command.js} +44 -22
- package/src/commands/login/login.docs.md +16 -0
- package/src/commands/logout/logout.command.js +15 -0
- package/src/commands/logout/logout.docs.md +9 -0
- package/src/commands/logs/logs.command.js +81 -0
- package/src/commands/logs/logs.docs.md +22 -0
- package/src/commands/make-default/make-default.command.js +17 -0
- package/src/commands/make-default/make-default.docs.md +15 -0
- package/src/commands/matomo/matomo.command.js +17 -0
- package/src/commands/matomo/matomo.docs.md +109 -0
- package/src/commands/matomo/matomo.get.command.js +17 -0
- package/src/commands/matomo/matomo.open.command.js +13 -0
- package/src/commands/matomo/matomo.open.logs.command.js +13 -0
- package/src/commands/matomo/matomo.open.webui.command.js +13 -0
- package/src/commands/matomo/matomo.rebuild.command.js +13 -0
- package/src/commands/matomo/matomo.restart.command.js +13 -0
- package/src/commands/metabase/metabase.command.js +17 -0
- package/src/commands/metabase/metabase.docs.md +169 -0
- package/src/commands/metabase/metabase.get.command.js +17 -0
- package/src/commands/metabase/metabase.open.command.js +13 -0
- package/src/commands/metabase/metabase.open.logs.command.js +13 -0
- package/src/commands/metabase/metabase.open.webui.command.js +13 -0
- package/src/commands/metabase/metabase.rebuild.command.js +13 -0
- package/src/commands/metabase/metabase.restart.command.js +13 -0
- package/src/commands/metabase/metabase.version.check.command.js +17 -0
- package/src/commands/metabase/metabase.version.command.js +17 -0
- package/src/commands/metabase/metabase.version.update.command.js +17 -0
- package/src/commands/ng/ng.args.js +27 -0
- package/src/commands/ng/ng.command.js +45 -0
- package/src/commands/ng/ng.create.command.js +60 -0
- package/src/commands/ng/ng.create.external.command.js +44 -0
- package/src/commands/ng/ng.delete.command.js +22 -0
- package/src/commands/ng/ng.delete.external.command.js +25 -0
- package/src/commands/ng/ng.docs.md +214 -0
- package/src/commands/ng/ng.get-config.command.js +32 -0
- package/src/commands/ng/ng.get.command.js +22 -0
- package/src/commands/ng/ng.link.command.js +25 -0
- package/src/commands/ng/ng.options.js +9 -0
- package/src/commands/ng/ng.search.command.js +22 -0
- package/src/commands/ng/ng.unlink.command.js +25 -0
- package/src/commands/notify-email/notify-email.add.command.js +65 -0
- package/src/commands/notify-email/notify-email.command.js +61 -0
- package/src/commands/notify-email/notify-email.docs.md +60 -0
- package/src/commands/notify-email/notify-email.remove.command.js +24 -0
- package/src/commands/open/open.command.js +24 -0
- package/src/commands/open/open.docs.md +16 -0
- package/src/commands/otoroshi/otoroshi.command.js +17 -0
- package/src/commands/otoroshi/otoroshi.disable-ng.command.js +13 -0
- package/src/commands/otoroshi/otoroshi.docs.md +211 -0
- package/src/commands/otoroshi/otoroshi.enable-ng.command.js +13 -0
- package/src/commands/otoroshi/otoroshi.get-config.command.js +13 -0
- package/src/commands/otoroshi/otoroshi.get.command.js +17 -0
- package/src/commands/otoroshi/otoroshi.open.command.js +13 -0
- package/src/commands/otoroshi/otoroshi.open.logs.command.js +13 -0
- package/src/commands/otoroshi/otoroshi.open.webui.command.js +13 -0
- package/src/commands/otoroshi/otoroshi.rebuild.command.js +13 -0
- package/src/commands/otoroshi/otoroshi.restart.command.js +13 -0
- package/src/commands/otoroshi/otoroshi.version.check.command.js +17 -0
- package/src/commands/otoroshi/otoroshi.version.command.js +17 -0
- package/src/commands/otoroshi/otoroshi.version.update.command.js +17 -0
- package/src/commands/profile/profile.command.js +60 -0
- package/src/commands/profile/profile.docs.md +23 -0
- package/src/commands/profile/profile.open.command.js +12 -0
- package/src/commands/published-config/published-config.command.js +40 -0
- package/src/commands/published-config/published-config.docs.md +77 -0
- package/src/commands/published-config/published-config.import.command.js +29 -0
- package/src/commands/published-config/published-config.rm.command.js +27 -0
- package/src/commands/published-config/published-config.set.command.js +34 -0
- package/src/commands/restart/restart.command.js +77 -0
- package/src/commands/restart/restart.docs.md +21 -0
- package/src/commands/scale/scale.command.js +121 -0
- package/src/commands/scale/scale.docs.md +23 -0
- package/src/commands/service/service.command.js +91 -0
- package/src/commands/service/service.docs.md +104 -0
- package/src/commands/service/service.link-addon.command.js +24 -0
- package/src/commands/service/service.link-app.command.js +23 -0
- package/src/commands/service/service.unlink-addon.command.js +24 -0
- package/src/commands/service/service.unlink-app.command.js +23 -0
- package/src/commands/ssh/ssh.command.js +40 -0
- package/src/commands/ssh/ssh.docs.md +17 -0
- package/src/commands/ssh-keys/ssh-keys.add.command.js +41 -0
- package/src/commands/ssh-keys/ssh-keys.args.js +8 -0
- package/src/commands/ssh-keys/ssh-keys.command.js +50 -0
- package/src/commands/ssh-keys/ssh-keys.docs.md +66 -0
- package/src/commands/ssh-keys/ssh-keys.open.command.js +12 -0
- package/src/commands/ssh-keys/ssh-keys.remove-all.command.js +54 -0
- package/src/commands/ssh-keys/ssh-keys.remove.command.js +26 -0
- package/src/commands/status/status.command.js +122 -0
- package/src/commands/status/status.docs.md +17 -0
- package/src/commands/stop/stop.command.js +23 -0
- package/src/commands/stop/stop.docs.md +16 -0
- package/src/commands/tcp-redirs/tcp-redirs.add.command.js +24 -0
- package/src/commands/tcp-redirs/tcp-redirs.command.js +41 -0
- package/src/commands/tcp-redirs/tcp-redirs.docs.md +71 -0
- package/src/commands/tcp-redirs/tcp-redirs.list-namespaces.command.js +48 -0
- package/src/commands/tcp-redirs/tcp-redirs.options.js +11 -0
- package/src/commands/tcp-redirs/tcp-redirs.remove.command.js +34 -0
- package/src/commands/tokens/tokens.command.js +43 -0
- package/src/commands/tokens/tokens.create.command.js +108 -0
- package/src/commands/tokens/tokens.docs.md +50 -0
- package/src/commands/tokens/tokens.revoke.command.js +25 -0
- package/src/commands/unlink/unlink.command.js +21 -0
- package/src/commands/unlink/unlink.docs.md +15 -0
- package/src/commands/version/version.command.js +13 -0
- package/src/commands/version/version.docs.md +9 -0
- package/src/commands/webhooks/webhooks.add.command.js +51 -0
- package/src/commands/webhooks/webhooks.command.js +57 -0
- package/src/commands/webhooks/webhooks.docs.md +61 -0
- package/src/commands/webhooks/webhooks.remove.command.js +24 -0
- package/src/lib/cliparse-patched.js +192 -0
- package/src/lib/define-argument.js +7 -0
- package/src/lib/define-argument.types.d.ts +23 -0
- package/src/lib/define-command.js +7 -0
- package/src/lib/define-command.types.d.ts +85 -0
- package/src/lib/define-common.types.d.ts +18 -0
- package/src/lib/define-option.js +7 -0
- package/src/lib/define-option.types.d.ts +29 -0
- package/src/lib/get-command-info.js +86 -0
- package/src/lib/get-command-info.types.d.ts +42 -0
- package/src/lib/k8s.js +1 -1
- package/src/lib/zod-utils.js +66 -0
- package/src/models/addon.js +2 -19
- package/src/models/app_configuration.js +0 -30
- package/src/models/application.js +4 -5
- package/src/models/application_configuration.js +5 -23
- package/src/models/domain.js +34 -2
- package/src/models/exit-strategy-option.js +0 -9
- package/src/models/git.js +1 -4
- package/src/models/log-v4.js +15 -4
- package/src/models/log.js +5 -0
- package/src/models/namespaces.js +1 -2
- package/src/models/notification.js +1 -7
- package/src/parsers.js +33 -111
- package/src/command-options.js +0 -55
- package/src/command-promise-handler.js +0 -16
- package/src/commands/accesslogs.js +0 -138
- package/src/commands/addon.js +0 -391
- package/src/commands/applications.js +0 -123
- package/src/commands/cancel-deploy.js +0 -19
- package/src/commands/config.js +0 -47
- package/src/commands/console.js +0 -20
- package/src/commands/create.js +0 -129
- package/src/commands/database.js +0 -73
- package/src/commands/delete.js +0 -24
- package/src/commands/deploy.js +0 -133
- package/src/commands/diag.js +0 -126
- package/src/commands/domain.js +0 -445
- package/src/commands/drain.js +0 -164
- package/src/commands/emails.js +0 -156
- package/src/commands/env.js +0 -124
- package/src/commands/features.js +0 -87
- package/src/commands/k8s.js +0 -193
- package/src/commands/keycloak.js +0 -138
- package/src/commands/kv.js +0 -93
- package/src/commands/link.js +0 -20
- package/src/commands/logout.js +0 -8
- package/src/commands/logs.js +0 -45
- package/src/commands/makeDefault.js +0 -11
- package/src/commands/matomo.js +0 -85
- package/src/commands/metabase.js +0 -112
- package/src/commands/ng.js +0 -202
- package/src/commands/notify-email.js +0 -99
- package/src/commands/open.js +0 -13
- package/src/commands/otoroshi.js +0 -150
- package/src/commands/profile.js +0 -55
- package/src/commands/published-config.js +0 -70
- package/src/commands/restart.js +0 -52
- package/src/commands/scale.js +0 -66
- package/src/commands/service.js +0 -105
- package/src/commands/ssh-keys.js +0 -144
- package/src/commands/ssh.js +0 -20
- package/src/commands/status.js +0 -115
- package/src/commands/stop.js +0 -12
- package/src/commands/tcp-redirs.js +0 -80
- package/src/commands/tokens.js +0 -144
- package/src/commands/unlink.js +0 -14
- package/src/commands/version.js +0 -6
- package/src/commands/webhooks.js +0 -74
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# 📖 `clever profile` command reference
|
|
2
|
+
|
|
3
|
+
## ➡️ `clever profile` <kbd>Since 0.10.1</kbd>
|
|
4
|
+
|
|
5
|
+
Display the profile of the current user
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
clever profile [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### ⚙️ Options
|
|
12
|
+
|
|
13
|
+
|Name|Description|
|
|
14
|
+
|---|---|
|
|
15
|
+
|`-F`, `--format` `<format>`|Output format (human, json) (default: human)|
|
|
16
|
+
|
|
17
|
+
## ➡️ `clever profile open` <kbd>Since 3.11.0</kbd>
|
|
18
|
+
|
|
19
|
+
Open your profile in the Console
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
clever profile open
|
|
23
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineCommand } from '../../lib/define-command.js';
|
|
2
|
+
import { openBrowser } from '../../models/utils.js';
|
|
3
|
+
|
|
4
|
+
export const profileOpenCommand = defineCommand({
|
|
5
|
+
description: 'Open your profile in the Console',
|
|
6
|
+
since: '3.11.0',
|
|
7
|
+
options: {},
|
|
8
|
+
args: [],
|
|
9
|
+
async handler() {
|
|
10
|
+
await openBrowser('/users/me/information', 'Opening the profile page in your browser');
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { getAllExposedEnvVars } from '@clevercloud/client/esm/api/v2/application.js';
|
|
2
|
+
import { toNameEqualsValueString } from '@clevercloud/client/esm/utils/env-vars.js';
|
|
3
|
+
import { defineCommand } from '../../lib/define-command.js';
|
|
4
|
+
import { Logger } from '../../logger.js';
|
|
5
|
+
import * as Application from '../../models/application.js';
|
|
6
|
+
import { sendToApi } from '../../models/send-to-api.js';
|
|
7
|
+
import { aliasOption, appIdOrNameOption, envFormatOption } from '../global.options.js';
|
|
8
|
+
|
|
9
|
+
export const publishedConfigCommand = defineCommand({
|
|
10
|
+
description: 'Manage the configuration made available to other applications by this application',
|
|
11
|
+
since: '0.5.0',
|
|
12
|
+
options: {
|
|
13
|
+
alias: aliasOption,
|
|
14
|
+
app: appIdOrNameOption,
|
|
15
|
+
format: envFormatOption,
|
|
16
|
+
},
|
|
17
|
+
args: [],
|
|
18
|
+
async handler(options) {
|
|
19
|
+
const { alias, app: appIdOrName, format } = options;
|
|
20
|
+
const { ownerId, appId } = await Application.resolveId(appIdOrName, alias);
|
|
21
|
+
|
|
22
|
+
const publishedConfigs = await getAllExposedEnvVars({ id: ownerId, appId }).then(sendToApi);
|
|
23
|
+
const pairs = Object.entries(publishedConfigs).map(([name, value]) => ({ name, value }));
|
|
24
|
+
|
|
25
|
+
switch (format) {
|
|
26
|
+
case 'json': {
|
|
27
|
+
Logger.printJson(pairs);
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
case 'shell':
|
|
31
|
+
Logger.println(toNameEqualsValueString(pairs, { addExports: true }));
|
|
32
|
+
break;
|
|
33
|
+
case 'human':
|
|
34
|
+
default: {
|
|
35
|
+
Logger.println('# Published configs');
|
|
36
|
+
Logger.println(toNameEqualsValueString(pairs, { addExports: false }));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# 📖 `clever published-config` command reference
|
|
2
|
+
|
|
3
|
+
## ➡️ `clever published-config` <kbd>Since 0.5.0</kbd>
|
|
4
|
+
|
|
5
|
+
Manage the configuration made available to other applications by this application
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
clever published-config [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### ⚙️ Options
|
|
12
|
+
|
|
13
|
+
|Name|Description|
|
|
14
|
+
|---|---|
|
|
15
|
+
|`-a`, `--alias` `<alias>`|Short name for the application|
|
|
16
|
+
|`--app` `<app-id\|app-name>`|Application to manage by its ID (or name, if unambiguous)|
|
|
17
|
+
|`-F`, `--format` `<format>`|Output format (human, json, shell) (default: human)|
|
|
18
|
+
|
|
19
|
+
## ➡️ `clever published-config import` <kbd>Since 0.5.0</kbd>
|
|
20
|
+
|
|
21
|
+
Load published configuration from STDIN
|
|
22
|
+
(WARNING: this deletes all current variables and replace them with the new list loaded from STDIN)
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
clever published-config import [options]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### ⚙️ Options
|
|
29
|
+
|
|
30
|
+
|Name|Description|
|
|
31
|
+
|---|---|
|
|
32
|
+
|`-a`, `--alias` `<alias>`|Short name for the application|
|
|
33
|
+
|`--app` `<app-id\|app-name>`|Application to manage by its ID (or name, if unambiguous)|
|
|
34
|
+
|`--json`|Import variables as JSON (an array of { "name": "THE_NAME", "value": "THE_VALUE" } objects)|
|
|
35
|
+
|
|
36
|
+
## ➡️ `clever published-config rm` <kbd>Since 0.5.0</kbd>
|
|
37
|
+
|
|
38
|
+
Remove a published configuration variable from an application
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
clever published-config rm <variable-name> [options]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 📥 Arguments
|
|
45
|
+
|
|
46
|
+
|Name|Description|
|
|
47
|
+
|---|---|
|
|
48
|
+
|`variable-name`|Name of the environment variable|
|
|
49
|
+
|
|
50
|
+
### ⚙️ Options
|
|
51
|
+
|
|
52
|
+
|Name|Description|
|
|
53
|
+
|---|---|
|
|
54
|
+
|`-a`, `--alias` `<alias>`|Short name for the application|
|
|
55
|
+
|`--app` `<app-id\|app-name>`|Application to manage by its ID (or name, if unambiguous)|
|
|
56
|
+
|
|
57
|
+
## ➡️ `clever published-config set` <kbd>Since 0.5.0</kbd>
|
|
58
|
+
|
|
59
|
+
Add or update a published configuration item named <variable-name> with the value <variable-value>
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
clever published-config set <variable-name> <variable-value> [options]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 📥 Arguments
|
|
66
|
+
|
|
67
|
+
|Name|Description|
|
|
68
|
+
|---|---|
|
|
69
|
+
|`variable-name`|Name of the environment variable|
|
|
70
|
+
|`variable-value`|Value of the environment variable|
|
|
71
|
+
|
|
72
|
+
### ⚙️ Options
|
|
73
|
+
|
|
74
|
+
|Name|Description|
|
|
75
|
+
|---|---|
|
|
76
|
+
|`-a`, `--alias` `<alias>`|Short name for the application|
|
|
77
|
+
|`--app` `<app-id\|app-name>`|Application to manage by its ID (or name, if unambiguous)|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { updateAllExposedEnvVars } from '@clevercloud/client/esm/api/v2/application.js';
|
|
2
|
+
import { defineCommand } from '../../lib/define-command.js';
|
|
3
|
+
import { Logger } from '../../logger.js';
|
|
4
|
+
import * as Application from '../../models/application.js';
|
|
5
|
+
import { sendToApi } from '../../models/send-to-api.js';
|
|
6
|
+
import * as variables from '../../models/variables.js';
|
|
7
|
+
import { aliasOption, appIdOrNameOption, importAsJsonOption } from '../global.options.js';
|
|
8
|
+
|
|
9
|
+
export const publishedConfigImportCommand = defineCommand({
|
|
10
|
+
description:
|
|
11
|
+
'Load published configuration from STDIN\n(WARNING: this deletes all current variables and replace them with the new list loaded from STDIN)',
|
|
12
|
+
since: '0.5.0',
|
|
13
|
+
options: {
|
|
14
|
+
alias: aliasOption,
|
|
15
|
+
app: appIdOrNameOption,
|
|
16
|
+
json: importAsJsonOption,
|
|
17
|
+
},
|
|
18
|
+
args: [],
|
|
19
|
+
async handler(options) {
|
|
20
|
+
const { alias, app: appIdOrName, json } = options;
|
|
21
|
+
const format = json ? 'json' : 'name-equals-value';
|
|
22
|
+
const { ownerId, appId } = await Application.resolveId(appIdOrName, alias);
|
|
23
|
+
|
|
24
|
+
const publishedConfigs = await variables.readVariablesFromStdin(format);
|
|
25
|
+
await updateAllExposedEnvVars({ id: ownerId, appId }, publishedConfigs).then(sendToApi);
|
|
26
|
+
|
|
27
|
+
Logger.println('Your published configs have been set');
|
|
28
|
+
},
|
|
29
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getAllExposedEnvVars, updateAllExposedEnvVars } from '@clevercloud/client/esm/api/v2/application.js';
|
|
2
|
+
import { defineCommand } from '../../lib/define-command.js';
|
|
3
|
+
import { Logger } from '../../logger.js';
|
|
4
|
+
import * as Application from '../../models/application.js';
|
|
5
|
+
import { sendToApi } from '../../models/send-to-api.js';
|
|
6
|
+
import { envVariableNameArg } from '../global.args.js';
|
|
7
|
+
import { aliasOption, appIdOrNameOption } from '../global.options.js';
|
|
8
|
+
|
|
9
|
+
export const publishedConfigRmCommand = defineCommand({
|
|
10
|
+
description: 'Remove a published configuration variable from an application',
|
|
11
|
+
since: '0.5.0',
|
|
12
|
+
options: {
|
|
13
|
+
alias: aliasOption,
|
|
14
|
+
app: appIdOrNameOption,
|
|
15
|
+
},
|
|
16
|
+
args: [envVariableNameArg],
|
|
17
|
+
async handler(options, varName) {
|
|
18
|
+
const { alias, app: appIdOrName } = options;
|
|
19
|
+
const { ownerId, appId } = await Application.resolveId(appIdOrName, alias);
|
|
20
|
+
|
|
21
|
+
const publishedConfigs = await getAllExposedEnvVars({ id: ownerId, appId }).then(sendToApi);
|
|
22
|
+
delete publishedConfigs[varName];
|
|
23
|
+
await updateAllExposedEnvVars({ id: ownerId, appId }, publishedConfigs).then(sendToApi);
|
|
24
|
+
|
|
25
|
+
Logger.println('Your published config item has been successfully removed');
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { getAllExposedEnvVars, updateAllExposedEnvVars } from '@clevercloud/client/esm/api/v2/application.js';
|
|
2
|
+
import { validateName } from '@clevercloud/client/esm/utils/env-vars.js';
|
|
3
|
+
import { defineCommand } from '../../lib/define-command.js';
|
|
4
|
+
import { Logger } from '../../logger.js';
|
|
5
|
+
import * as Application from '../../models/application.js';
|
|
6
|
+
import { sendToApi } from '../../models/send-to-api.js';
|
|
7
|
+
import { envVariableNameArg, envVariableValueArg } from '../global.args.js';
|
|
8
|
+
import { aliasOption, appIdOrNameOption } from '../global.options.js';
|
|
9
|
+
|
|
10
|
+
export const publishedConfigSetCommand = defineCommand({
|
|
11
|
+
description: 'Add or update a published configuration item named <variable-name> with the value <variable-value>',
|
|
12
|
+
since: '0.5.0',
|
|
13
|
+
options: {
|
|
14
|
+
alias: aliasOption,
|
|
15
|
+
app: appIdOrNameOption,
|
|
16
|
+
},
|
|
17
|
+
args: [envVariableNameArg, envVariableValueArg],
|
|
18
|
+
async handler(options, varName, varValue) {
|
|
19
|
+
const { alias, app: appIdOrName } = options;
|
|
20
|
+
|
|
21
|
+
const nameIsValid = validateName(varName);
|
|
22
|
+
if (!nameIsValid) {
|
|
23
|
+
throw new Error(`Published config name ${varName} is invalid`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const { ownerId, appId } = await Application.resolveId(appIdOrName, alias);
|
|
27
|
+
|
|
28
|
+
const publishedConfigs = await getAllExposedEnvVars({ id: ownerId, appId }).then(sendToApi);
|
|
29
|
+
publishedConfigs[varName] = varValue;
|
|
30
|
+
await updateAllExposedEnvVars({ id: ownerId, appId }, publishedConfigs).then(sendToApi);
|
|
31
|
+
|
|
32
|
+
Logger.println('Your published config item has been successfully saved');
|
|
33
|
+
},
|
|
34
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineCommand } from '../../lib/define-command.js';
|
|
3
|
+
import { defineOption } from '../../lib/define-option.js';
|
|
4
|
+
import { styleText } from '../../lib/style-text.js';
|
|
5
|
+
import { Logger } from '../../logger.js';
|
|
6
|
+
import * as Application from '../../models/application.js';
|
|
7
|
+
import * as ExitStrategy from '../../models/exit-strategy-option.js';
|
|
8
|
+
import * as git from '../../models/git.js';
|
|
9
|
+
import * as Log from '../../models/log-v4.js';
|
|
10
|
+
import {
|
|
11
|
+
aliasOption,
|
|
12
|
+
appIdOrNameOption,
|
|
13
|
+
exitOnDeployOption,
|
|
14
|
+
followDeployLogsOption,
|
|
15
|
+
quietOption,
|
|
16
|
+
} from '../global.options.js';
|
|
17
|
+
|
|
18
|
+
export const restartCommand = defineCommand({
|
|
19
|
+
description: 'Start or restart an application',
|
|
20
|
+
since: '0.4.0',
|
|
21
|
+
options: {
|
|
22
|
+
commit: defineOption({
|
|
23
|
+
name: 'commit',
|
|
24
|
+
schema: z.string().optional(),
|
|
25
|
+
description: 'Restart the application with a specific commit ID',
|
|
26
|
+
placeholder: 'commit-id',
|
|
27
|
+
}),
|
|
28
|
+
withoutCache: defineOption({
|
|
29
|
+
name: 'without-cache',
|
|
30
|
+
schema: z.boolean().default(false),
|
|
31
|
+
description: 'Restart the application without using cache',
|
|
32
|
+
}),
|
|
33
|
+
alias: aliasOption,
|
|
34
|
+
app: appIdOrNameOption,
|
|
35
|
+
quiet: quietOption,
|
|
36
|
+
follow: followDeployLogsOption,
|
|
37
|
+
exitOnDeploy: exitOnDeployOption,
|
|
38
|
+
},
|
|
39
|
+
args: [],
|
|
40
|
+
async handler(options) {
|
|
41
|
+
const { alias, app: appIdOrName, quiet, commit, withoutCache, follow, exitOnDeploy } = options;
|
|
42
|
+
|
|
43
|
+
const exitStrategy = ExitStrategy.get(follow, exitOnDeploy);
|
|
44
|
+
|
|
45
|
+
const { ownerId, appId } = await Application.resolveId(appIdOrName, alias);
|
|
46
|
+
const fullCommitId = await git.resolveFullCommitId(commit);
|
|
47
|
+
const app = await Application.get(ownerId, appId);
|
|
48
|
+
|
|
49
|
+
if (app == null) {
|
|
50
|
+
throw new Error("The application doesn't exist");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const remoteCommitId = app.commitId;
|
|
54
|
+
|
|
55
|
+
const commitId = fullCommitId || remoteCommitId;
|
|
56
|
+
if (commitId != null) {
|
|
57
|
+
const cacheSuffix = withoutCache ? ' without using cache' : '';
|
|
58
|
+
Logger.println(
|
|
59
|
+
`🔄 Restarting ${styleText('bold', app.name)}${cacheSuffix} ${styleText('grey', `(${commitId})`)}`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// This should be handled by the API when a deployment ID is set but we'll do this for now
|
|
64
|
+
const redeployDate = new Date();
|
|
65
|
+
|
|
66
|
+
const redeploy = await Application.redeploy(ownerId, appId, fullCommitId, withoutCache);
|
|
67
|
+
|
|
68
|
+
return Log.watchDeploymentAndDisplayLogs({
|
|
69
|
+
ownerId,
|
|
70
|
+
appId,
|
|
71
|
+
deploymentId: redeploy.deploymentId,
|
|
72
|
+
quiet,
|
|
73
|
+
redeployDate,
|
|
74
|
+
exitStrategy,
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# 📖 `clever restart` command reference
|
|
2
|
+
|
|
3
|
+
## ➡️ `clever restart` <kbd>Since 0.4.0</kbd>
|
|
4
|
+
|
|
5
|
+
Start or restart an application
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
clever restart [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### ⚙️ Options
|
|
12
|
+
|
|
13
|
+
|Name|Description|
|
|
14
|
+
|---|---|
|
|
15
|
+
|`-a`, `--alias` `<alias>`|Short name for the application|
|
|
16
|
+
|`--app` `<app-id\|app-name>`|Application to manage by its ID (or name, if unambiguous)|
|
|
17
|
+
|`--commit` `<commit-id>`|Restart the application with a specific commit ID|
|
|
18
|
+
|`-e`, `--exit-on` `<step>`|Step at which the logs streaming is ended, steps are: deploy-start, deploy-end, never (default: deploy-end)|
|
|
19
|
+
|`--follow`|Continue to follow logs after deployment has ended *(deprecated, use `--exit-on never` instead)*|
|
|
20
|
+
|`-q`, `--quiet`|Don't show logs during deployment|
|
|
21
|
+
|`--without-cache`|Restart the application without using cache|
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineCommand } from '../../lib/define-command.js';
|
|
3
|
+
import { defineOption } from '../../lib/define-option.js';
|
|
4
|
+
import { Logger } from '../../logger.js';
|
|
5
|
+
import * as Application from '../../models/application.js';
|
|
6
|
+
import { listAvailableFlavors } from '../../models/application.js';
|
|
7
|
+
import { buildFlavor, flavor } from '../../parsers.js';
|
|
8
|
+
import { aliasOption, appIdOrNameOption } from '../global.options.js';
|
|
9
|
+
|
|
10
|
+
function validateOptions(options) {
|
|
11
|
+
let { flavor, minFlavor, maxFlavor } = options;
|
|
12
|
+
let { instances, minInstances, maxInstances, buildFlavor } = options;
|
|
13
|
+
|
|
14
|
+
if ([flavor, minFlavor, maxFlavor, instances, minInstances, maxInstances, buildFlavor].every((v) => v == null)) {
|
|
15
|
+
throw new Error('You should provide at least 1 option');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (flavor != null) {
|
|
19
|
+
if (minFlavor != null || maxFlavor != null) {
|
|
20
|
+
throw new Error("You can't use --flavor and --min-flavor or --max-flavor at the same time");
|
|
21
|
+
}
|
|
22
|
+
minFlavor = flavor;
|
|
23
|
+
maxFlavor = flavor;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (instances != null) {
|
|
27
|
+
if (minInstances != null || maxInstances != null) {
|
|
28
|
+
throw new Error("You can't use --instances and --min-instances or --max-instances at the same time");
|
|
29
|
+
}
|
|
30
|
+
minInstances = instances;
|
|
31
|
+
maxInstances = instances;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (minInstances != null && maxInstances != null && minInstances > maxInstances) {
|
|
35
|
+
throw new Error("min-instances can't be greater than max-instances");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (minFlavor != null && maxFlavor != null) {
|
|
39
|
+
const minFlavorIndex = Application.listAvailableFlavors().indexOf(minFlavor);
|
|
40
|
+
const maxFlavorIndex = Application.listAvailableFlavors().indexOf(maxFlavor);
|
|
41
|
+
if (minFlavorIndex > maxFlavorIndex) {
|
|
42
|
+
throw new Error("min-flavor can't be a greater flavor than max-flavor");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return { minFlavor, maxFlavor, minInstances, maxInstances, buildFlavor };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const scaleCommand = defineCommand({
|
|
50
|
+
description: 'Change scalability of an application',
|
|
51
|
+
since: '0.4.0',
|
|
52
|
+
options: {
|
|
53
|
+
flavor: defineOption({
|
|
54
|
+
name: 'flavor',
|
|
55
|
+
schema: z.string().transform(flavor).optional(),
|
|
56
|
+
description: 'The instance size of your application',
|
|
57
|
+
placeholder: 'flavor',
|
|
58
|
+
complete: listAvailableFlavors,
|
|
59
|
+
}),
|
|
60
|
+
minFlavor: defineOption({
|
|
61
|
+
name: 'min-flavor',
|
|
62
|
+
schema: z.string().transform(flavor).optional(),
|
|
63
|
+
description: 'The minimum scale size of your application',
|
|
64
|
+
placeholder: 'flavor',
|
|
65
|
+
complete: listAvailableFlavors,
|
|
66
|
+
}),
|
|
67
|
+
maxFlavor: defineOption({
|
|
68
|
+
name: 'max-flavor',
|
|
69
|
+
schema: z.string().transform(flavor).optional(),
|
|
70
|
+
description: 'The maximum instance size of your application',
|
|
71
|
+
placeholder: 'flavor',
|
|
72
|
+
complete: listAvailableFlavors,
|
|
73
|
+
}),
|
|
74
|
+
instances: defineOption({
|
|
75
|
+
name: 'instances',
|
|
76
|
+
schema: z.coerce.number().int().min(1).max(20).optional(),
|
|
77
|
+
description: 'The number of parallel instances',
|
|
78
|
+
placeholder: 'instances',
|
|
79
|
+
}),
|
|
80
|
+
minInstances: defineOption({
|
|
81
|
+
name: 'min-instances',
|
|
82
|
+
schema: z.coerce.number().int().min(1).max(20).optional(),
|
|
83
|
+
description: 'The minimum number of parallel instances',
|
|
84
|
+
placeholder: 'number',
|
|
85
|
+
}),
|
|
86
|
+
maxInstances: defineOption({
|
|
87
|
+
name: 'max-instances',
|
|
88
|
+
schema: z.coerce.number().int().min(1).max(20).optional(),
|
|
89
|
+
description: 'The maximum number of parallel instances',
|
|
90
|
+
placeholder: 'number',
|
|
91
|
+
}),
|
|
92
|
+
buildFlavor: defineOption({
|
|
93
|
+
name: 'build-flavor',
|
|
94
|
+
schema: z.string().transform(buildFlavor).optional(),
|
|
95
|
+
description: "The size of the build instance, or 'disabled' if you want to disable dedicated build instances",
|
|
96
|
+
placeholder: 'flavor',
|
|
97
|
+
}),
|
|
98
|
+
alias: aliasOption,
|
|
99
|
+
app: appIdOrNameOption,
|
|
100
|
+
},
|
|
101
|
+
args: [],
|
|
102
|
+
async handler(options) {
|
|
103
|
+
const { alias, app: appIdOrName } = options;
|
|
104
|
+
const { minFlavor, maxFlavor, minInstances, maxInstances, buildFlavor } = validateOptions(options);
|
|
105
|
+
const { ownerId, appId } = await Application.resolveId(appIdOrName, alias);
|
|
106
|
+
|
|
107
|
+
await Application.setScalability(
|
|
108
|
+
appId,
|
|
109
|
+
ownerId,
|
|
110
|
+
{
|
|
111
|
+
minFlavor,
|
|
112
|
+
maxFlavor,
|
|
113
|
+
minInstances,
|
|
114
|
+
maxInstances,
|
|
115
|
+
},
|
|
116
|
+
buildFlavor,
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
Logger.println('App rescaled successfully');
|
|
120
|
+
},
|
|
121
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# 📖 `clever scale` command reference
|
|
2
|
+
|
|
3
|
+
## ➡️ `clever scale` <kbd>Since 0.4.0</kbd>
|
|
4
|
+
|
|
5
|
+
Change scalability of an application
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
clever scale [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### ⚙️ Options
|
|
12
|
+
|
|
13
|
+
|Name|Description|
|
|
14
|
+
|---|---|
|
|
15
|
+
|`-a`, `--alias` `<alias>`|Short name for the application|
|
|
16
|
+
|`--app` `<app-id\|app-name>`|Application to manage by its ID (or name, if unambiguous)|
|
|
17
|
+
|`--build-flavor` `<flavor>`|The size of the build instance, or 'disabled' if you want to disable dedicated build instances|
|
|
18
|
+
|`--flavor` `<flavor>`|The instance size of your application|
|
|
19
|
+
|`--instances` `<instances>`|The number of parallel instances|
|
|
20
|
+
|`--max-flavor` `<flavor>`|The maximum instance size of your application|
|
|
21
|
+
|`--max-instances` `<number>`|The maximum number of parallel instances|
|
|
22
|
+
|`--min-flavor` `<flavor>`|The minimum scale size of your application|
|
|
23
|
+
|`--min-instances` `<number>`|The minimum number of parallel instances|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineCommand } from '../../lib/define-command.js';
|
|
3
|
+
import { defineOption } from '../../lib/define-option.js';
|
|
4
|
+
import { styleText } from '../../lib/style-text.js';
|
|
5
|
+
import { Logger } from '../../logger.js';
|
|
6
|
+
import * as Addon from '../../models/addon.js';
|
|
7
|
+
import * as Application from '../../models/application.js';
|
|
8
|
+
import { aliasOption, appIdOrNameOption, humanJsonOutputFormatOption } from '../global.options.js';
|
|
9
|
+
|
|
10
|
+
export const serviceCommand = defineCommand({
|
|
11
|
+
description: 'Manage service dependencies',
|
|
12
|
+
since: '0.5.0',
|
|
13
|
+
options: {
|
|
14
|
+
onlyApps: defineOption({
|
|
15
|
+
name: 'only-apps',
|
|
16
|
+
schema: z.boolean().default(false),
|
|
17
|
+
description: 'Only show app dependencies',
|
|
18
|
+
}),
|
|
19
|
+
onlyAddons: defineOption({
|
|
20
|
+
name: 'only-addons',
|
|
21
|
+
schema: z.boolean().default(false),
|
|
22
|
+
description: 'Only show add-on dependencies',
|
|
23
|
+
}),
|
|
24
|
+
showAll: defineOption({
|
|
25
|
+
name: 'show-all',
|
|
26
|
+
schema: z.boolean().default(false),
|
|
27
|
+
description: 'Show all available add-ons and applications',
|
|
28
|
+
}),
|
|
29
|
+
alias: aliasOption,
|
|
30
|
+
app: appIdOrNameOption,
|
|
31
|
+
format: humanJsonOutputFormatOption,
|
|
32
|
+
},
|
|
33
|
+
args: [],
|
|
34
|
+
async handler(options) {
|
|
35
|
+
const { alias, app: appIdOrName, showAll, onlyApps, onlyAddons, format } = options;
|
|
36
|
+
if (onlyApps && onlyAddons) {
|
|
37
|
+
throw new Error('--only-apps and --only-addons are mutually exclusive');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const { ownerId, appId } = await Application.resolveId(appIdOrName, alias);
|
|
41
|
+
|
|
42
|
+
const formattedServices = {};
|
|
43
|
+
|
|
44
|
+
if (!onlyAddons) {
|
|
45
|
+
const apps = await Application.listDependencies(ownerId, appId, showAll);
|
|
46
|
+
formattedServices.applications = apps.map((app) => ({
|
|
47
|
+
id: app.id,
|
|
48
|
+
name: app.name,
|
|
49
|
+
isLinked: app.isLinked,
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!onlyApps) {
|
|
54
|
+
const addons = await Addon.list(ownerId, appId, showAll);
|
|
55
|
+
formattedServices.addons = addons.map((addon) => ({
|
|
56
|
+
id: addon.id,
|
|
57
|
+
realId: addon.realId,
|
|
58
|
+
name: addon.name,
|
|
59
|
+
isLinked: addon.isLinked,
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
switch (format) {
|
|
64
|
+
case 'json': {
|
|
65
|
+
Logger.printJson(formattedServices);
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
case 'human':
|
|
69
|
+
default: {
|
|
70
|
+
const { applications = [], addons = [] } = formattedServices;
|
|
71
|
+
|
|
72
|
+
if (applications.length === 0 && addons.length === 0) {
|
|
73
|
+
Logger.printInfo(
|
|
74
|
+
`No linked services found, use ${styleText('blue', 'clever service link-app')} or ${styleText('blue', 'clever service link-addon')} to link services to an application`,
|
|
75
|
+
);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (applications.length > 0) {
|
|
80
|
+
Logger.println('Applications:');
|
|
81
|
+
applications.forEach(({ isLinked, name }) => Logger.println(`${isLinked ? '*' : ' '} ${name}`));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (addons.length > 0) {
|
|
85
|
+
Logger.println('Addons:');
|
|
86
|
+
addons.forEach(({ isLinked, name, realId }) => Logger.println(`${isLinked ? '*' : ' '} ${name} (${realId})`));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
});
|