Skip to content

Commit

Permalink
merge conflict fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HaseenaSainul committed Mar 1, 2024
1 parent f64fb6d commit 80acfba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/macrofier/engine.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ const convertEnumTemplate = (schema, templateName, templates) => {
const template = getTemplate(templateName, templates).split('\n')
for (var i = 0; i < template.length; i++) {
if (template[i].indexOf('${key}') >= 0) {
template[i] = enumSchema.enum.map(value => {
template[i] = enumSchema.enum.map((value, id) => {
const safeName = getSafeEnumKeyName(value)
return template[i].replace(/\$\{key\}/g, safeName)
.replace(/\$\{value\}/g, value)
Expand All @@ -823,8 +823,8 @@ const generateEventEnums = (json, templates, options = { destination: '' }) => {
return compose(
option(''),
map(val => {
let template = getTemplate(`/sections/enum.${suffix}`, templates)
return template ? template.replace(/\$\{schema.list\}/g, val) : val
let template = val ? getTemplate(`/sections/enum.${suffix}`, templates) : val
return template ? template.replace(/\$\{schema.list\}/g, val.trimEnd()) : val
}),
map(reduce((acc, val) => acc.concat(val).concat('\n'), '')),
map(map((schema) => convertEnumTemplate(schema, suffix ? `/types/enum.${suffix}` : '/types/enum', templates))),
Expand Down Expand Up @@ -1269,7 +1269,7 @@ function insertMethodMacros(template, methodObj, json, templates, type = '', exa
}
}

const paramDelimiter = config.operators ? config.operators.paramDelimiter : ', '
const paramDelimiter = config.operators ? config.operators.paramDelimiter : ''

const temporalItemName = isTemporalSetMethod(methodObj) ? methodObj.result.schema.items && methodObj.result.schema.items.title || 'Item' : ''
const temporalAddName = isTemporalSetMethod(methodObj) ? `on${temporalItemName}Available` : ''
Expand Down

0 comments on commit 80acfba

Please sign in to comment.