Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge staging to development #1218

Merged
merged 5 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/contentstack-config/messages/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"CLI_CONFIG_INQUIRE_API_KEY": "Enter stack api key",
"CLI_CONFIG_INQUIRE_BASE_BRANCH": "Enter base branch",
"CLI_CONFIG_BRANCH_LIST_NO_BRANCHES": "No branches are added. Use config:set:base-branch command to add base branch.",
"CLI_CONFIG_INQUIRE_EARLY_ACCESS_HEADER_VALUE": "Enter early access header value",
"CLI_CONFIG_INQUIRE_EARLY_ACCESS_HEADER_ALIAS": "Enter early access header alias",
"CLI_BRANCH_REQUIRED_FIELD": "Required given field"
"CLI_CONFIG_INQUIRE_EARLY_ACCESS_HEADER_VALUE": "Please enter Early Access Program header value",
"CLI_CONFIG_INQUIRE_EARLY_ACCESS_HEADER_ALIAS": "Please enter Early Access Program header alias",
"CLI_BRANCH_REQUIRED_FIELD": "Please enter the required field details"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { cliux, configHandler } from '@contentstack/cli-utilities';
import { Command } from '@contentstack/cli-command';

export default class GetEarlyAccessHeaderCommand extends Command {
static description = 'Display early access headers';
static description = 'Display Early Access Program headers';
static aliases: string[] = ['config:get:ea-header'];
static examples = ['$ <%= config.bin %> <%= command.id %>'];

Expand All @@ -29,10 +29,10 @@ export default class GetEarlyAccessHeaderCommand extends Command {
},
);
} else {
cliux.print(`No early access header found`, { color: 'red' });
cliux.print(`No Early Access Program header found!`, { color: 'red' });
}
} catch (error) {
this.log('Failed to get the early access header config', error instanceof Error ? error.message : error);
this.log('Unable to retrieve the Early Access Program header config', error instanceof Error ? error.message : error);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { interactive } from '../../../utils';
import { Command } from '@contentstack/cli-command';

export default class RemoveEarlyAccessHeader extends Command {
static description = 'Remove early access header';
static description = 'Remove Early Access Program header';
static aliases: string[] = ['config:remove:ea-header'];
static flags: FlagInput = {
'header-alias': flags.string({ description: 'Early access header alias' }),
Expand All @@ -23,7 +23,7 @@ export default class RemoveEarlyAccessHeader extends Command {
earlyAccessHeaderAlias = await interactive.askEarlyAccessHeaderAlias();
}
if (configHandler.get(`earlyAccessHeaders.${earlyAccessHeaderAlias}`) === undefined) {
cliux.error(`No early access header set for alias : ${earlyAccessHeaderAlias}`);
cliux.error(`Early Access Program header not configured for alias: ${earlyAccessHeaderAlias}`);
return;
}
if (!skipConfirmation) {
Expand All @@ -33,9 +33,9 @@ export default class RemoveEarlyAccessHeader extends Command {
}
}
configHandler.delete(`earlyAccessHeaders.${earlyAccessHeaderAlias}`);
cliux.success(`Removed early access header '${earlyAccessHeaderAlias}' successfully`);
cliux.success(`Early Access Program header '${earlyAccessHeaderAlias}' has been successfully removed`);
} catch (error) {
this.log('Failed to remove the early access header config', error instanceof Error ? error.message : error);
this.log('Unable to remove the Early Access Program header config', error instanceof Error ? error.message : error);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { interactive } from '../../../utils';
import { Command } from '@contentstack/cli-command';

export default class SetEarlyAccessHeaderCommand extends Command {
static description = 'Set early access header';
static description = 'Set Early Access Program header';
static aliases: string[] = ['config:set:ea-header'];
static flags: FlagInput = {
'header-alias': flags.string({ description: 'Alias for the header' }),
'header-alias': flags.string({ description: 'Early access header alias' }),
header: flags.string({ description: 'Early access header value' }),
};
static examples: string[] = [
Expand All @@ -27,10 +27,10 @@ export default class SetEarlyAccessHeaderCommand extends Command {
}
configHandler.set(`earlyAccessHeaders.${earlyAccessHeaderAlias}`, earlyAccessHeader);
cliux.success(
`Early access header '${earlyAccessHeader}' with alias '${earlyAccessHeaderAlias}' is set successfully`,
`Early access header '${earlyAccessHeader}' with alias '${earlyAccessHeaderAlias}' has been successfully set `,
);
} catch (error) {
this.log('Failed to set the early access header config', error instanceof Error ? error.message : error);
this.log('Unable to set the Early Access Program header config', error instanceof Error ? error.message : error);
}
}
}
Loading