Skip to content

Commit

Permalink
Merge pull request #1380 from Accenture/bug/1360-default-retrieve-lis…
Browse files Browse the repository at this point in the history
…t-includes-empty-string-after-mcdev-upgrade

Bug/1360 default retrieve list includes empty string after mcdev upgrade
  • Loading branch information
JoernBerkefeld committed Jun 22, 2024
2 parents c75c8ba + 33e947e commit a21988a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
15 changes: 5 additions & 10 deletions @types/lib/metadataTypes/TransactionalMessage.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ declare namespace TransactionalMessage {
isUpdateable: boolean;
retrieving: boolean;
template: boolean;
};
}; /**
* TransactionalMessage MetadataType
*
* @augments MetadataType
*/
description: {
isCreateable: boolean;
isUpdateable: boolean;
Expand All @@ -120,15 +124,6 @@ declare namespace TransactionalMessage {
requestId: {
isCreateable: boolean;
isUpdateable: boolean;
/**
* Retrieves Metadata
*
* @param {string} [retrieveDir] Directory where retrieved metadata directory will be saved
* @param {void | string[]} [_] unused parameter
* @param {void | string[]} [__] unused parameter
* @param {string} [key] customer key of single item to retrieve
* @returns {Promise.<MetadataTypeMapObj>} Promise of metadata
*/
retrieving: boolean;
template: boolean;
};
Expand Down
2 changes: 1 addition & 1 deletion @types/lib/metadataTypes/TransactionalMessage.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion @types/lib/util/cli.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {
restPageSize: 100,
type: '',
typeDescription: 'here as a placeholder to have auto completion',
typeRetrieveByDefault: true,
typeRetrieveByDefault: false,
typeName: '',
fields: {
name: {
Expand Down
12 changes: 10 additions & 2 deletions lib/util/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,10 @@ const Cli = {
}
const flattenedDefinitions = [];
for (const el in MetadataDefinitions) {
if (MetadataDefinitions[el].type === '') {
// dont offer wrapper types like TransactionalMessage which don't have a value in "type"
continue;
}
// if subtypes on metadata (eg. Assets) then add each nested subtype
if (
MetadataDefinitions[el].subTypes &&
Expand Down Expand Up @@ -618,8 +622,8 @@ const Cli = {

for (const apiName of apiNameArr) {
const details = MetadataDefinitions[apiName];
if (!details.type) {
// we created the main type transactional message but don't want to show it here
if (details.type === '') {
// skip wrapper types like TransactionalMessage which don't have a value in "type"
continue;
}
const supportCheckClass = apiName.startsWith('transactional')
Expand Down Expand Up @@ -662,6 +666,10 @@ const Cli = {

const typeChoices = [];
for (const el in MetadataDefinitions) {
if (MetadataDefinitions[el].type === '') {
// skip wrapper types like TransactionalMessage which don't have a value in "type"
continue;
}
if (MetadataDefinitions[el].subTypes && MetadataDefinitions[el].extendedSubTypes) {
// used for assets to show whats available by default
typeChoices.push({
Expand Down

0 comments on commit a21988a

Please sign in to comment.