Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x 193x | import { z } from 'zod';
import { defineOption } from '../lib/define-option.js';
import { listAvailableAliases } from '../models/application.js';
import { listMetaEvents } from '../models/notification.js';
import { appIdOrName, date, orgaIdOrName } from '../parsers.js';
export const aliasOption = defineOption({
name: 'alias',
schema: z.string().optional(),
description: 'Short name for the application',
aliases: ['a'],
placeholder: 'alias',
complete: listAvailableAliases,
});
export const appIdOrNameOption = defineOption({
name: 'app',
schema: z.string().transform(appIdOrName).optional(),
description: 'Application to manage by its ID (or name, if unambiguous)',
placeholder: 'app-id|app-name',
});
export const logsFormatOption = defineOption({
name: 'format',
schema: z.enum(['human', 'json', 'json-stream']).default('human'),
description: 'Output format',
aliases: ['F'],
placeholder: 'format',
});
export const accessLogsFormatOption = defineOption({
name: 'format',
schema: z.enum(['human', 'json', 'json-stream', 'clf']).default('human'),
description: 'Output format',
aliases: ['F'],
placeholder: 'format',
});
export const beforeOption = defineOption({
name: 'before',
schema: z.string().transform(date).optional(),
description: 'Fetch logs before this date/time (ISO8601 date, positive number in seconds or duration, e.g.: 1h)',
aliases: ['until'],
placeholder: 'before',
});
export const afterOption = defineOption({
name: 'after',
schema: z.string().transform(date).optional(),
description: 'Fetch logs after this date/time (ISO8601 date, positive number in seconds or duration, e.g.: 1h)',
aliases: ['since'],
placeholder: 'after',
});
export const addonIdOrRealIdOption = defineOption({
name: 'addon',
schema: z.string().optional(),
description: 'Add-on ID or real ID',
placeholder: 'addon-id',
});
export const orgaIdOrNameOption = defineOption({
name: 'org',
schema: z.string().transform(orgaIdOrName).optional(),
description: 'Organisation to target by its ID (or name, if unambiguous)',
aliases: ['o', 'owner'],
placeholder: 'org-id|org-name',
});
export const humanJsonOutputFormatOption = defineOption({
name: 'format',
schema: z.enum(['human', 'json']).default('human'),
description: 'Output format',
aliases: ['F'],
placeholder: 'format',
});
export const skipConfirmationOption = defineOption({
name: 'yes',
schema: z.boolean().default(false),
description: 'Skip confirmation prompts',
aliases: ['y'],
});
export const envFormatOption = defineOption({
name: 'format',
schema: z.enum(['human', 'json', 'shell']).default('human'),
description: 'Output format',
aliases: ['F'],
placeholder: 'format',
});
export const aliasCreationOption = defineOption({
name: 'alias',
schema: z.string().optional(),
description: 'Short name for the application',
aliases: ['a'],
placeholder: 'alias',
});
export const quietOption = defineOption({
name: 'quiet',
schema: z.boolean().default(false),
description: "Don't show logs during deployment",
aliases: ['q'],
});
export const followDeployLogsOption = defineOption({
name: 'follow',
schema: z.boolean().default(false),
description: 'Continue to follow logs after deployment has ended',
deprecated: 'use `--exit-on never` instead',
});
export const exitOnDeployOption = defineOption({
name: 'exit-on',
schema: z.enum(['deploy-start', 'deploy-end', 'never']).default('deploy-end'),
description: 'Step at which the logs streaming is ended',
aliases: ['e'],
placeholder: 'step',
});
export const importAsJsonOption = defineOption({
name: 'json',
schema: z.boolean().default(false),
description: 'Import variables as JSON (an array of { \"name\": \"THE_NAME\", \"value\": \"THE_VALUE\" } objects)',
});
export const targetVersionOption = defineOption({
name: 'target',
schema: z.string().optional(),
description: 'Target version to upgrade to (e.g.: 24, 2.4, 2.4.1)',
placeholder: 'version',
});
export const listAllNotificationsOption = defineOption({
name: 'list-all',
schema: z.boolean().default(false),
description: "List all notifications for your user or for an organisation with the '--org' option",
});
export const notificationEventTypeOption = defineOption({
name: 'event',
schema: z
.string()
.transform((v) => v.split(','))
.optional(),
description: 'Restrict notifications to specific event types',
placeholder: 'event-type',
complete: listMetaEvents,
});
export const notificationScopeOption = defineOption({
name: 'service',
schema: z
.string()
.transform((v) => v.split(','))
.optional(),
description: 'Restrict notifications to specific applications and add-ons (requires --org)',
placeholder: 'service-id',
});
export const helpOption = defineOption({
name: 'help',
schema: z.boolean().optional(),
description: 'Display help about this program',
aliases: ['?'],
});
export const versionOption = defineOption({
name: 'version',
schema: z.boolean().optional(),
description: 'Display the version of this program',
aliases: ['V'],
});
export const colorOption = defineOption({
name: 'color',
schema: z.boolean().default(true),
description: 'Choose whether to print colors or not. You can also use --no-color',
});
export const updateNotifierOption = defineOption({
name: 'update-notifier',
schema: z.boolean().default(true),
description: 'Choose whether to use update notifier or not. You can also use --no-update-notifier',
});
export const verboseOption = defineOption({
name: 'verbose',
schema: z.boolean().default(false),
description: 'Verbose output',
aliases: ['v'],
});
|