Skip to content

Commit

Permalink
Revert "fix: type detection of EmailServicesFunction metadata type (s…
Browse files Browse the repository at this point in the history
…colladon#831)"

This reverts commit 8ac5518.
  • Loading branch information
a-ursu committed May 24, 2024
1 parent 5aa7858 commit 8b53c13
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 63 deletions.
69 changes: 34 additions & 35 deletions .github/linters/.cspell.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,46 @@
{
"ignorePaths": [
"**/CHANGELOG.md",
"**/node_modules/**",
"**/.git/**",
"**/.yarnrc.yml",
"**/megalinter.yml",
"**/node_modules/**",
"**/yarn.lock",
"**/.yarnrc.yml",
"**/src/metadata/**",
"**/src/service/typeHandlerFactory.ts",
"**/yarn.lock"
"**/src/service/typeHandlerFactory.ts"
],
"language": "en",
"noConfigSearch": true,
"version": "0.2",
"words": [
"\u00c0gain",
"Afile",
"CODECOV",
"CODEOWNERS",
"Cherfaoui",
"Colladon",
"Commitlint",
"depcheckrc",
"FORCEIGNORE",
"FORCEINCLUDE",
"FULLNAME",
"Flexi",
"gitdir",
"hardlinks",
"Iframe",
"knip",
"METAFILE",
"Mehdi",
"Nimn",
"Omni",
"Parens",
"SFDX",
"STATICRESOURCE",
"Scontrol",
"Sebastien",
"Sfdx",
"Translationline",
"Unpackaged",
"Wavehandler",
"amannn",
"anotherignore",
"apexskier",
Expand All @@ -25,60 +51,43 @@
"behaviour",
"benchmarkjs",
"brqh",
"Cherfaoui",
"codeclimate",
"codecov",
"CODECOV",
"CODEOWNERS",
"Colladon",
"commandsstop",
"commitlint",
"Commitlint",
"contentassets",
"customindex",
"datacategorygroup",
"datacategorygroups",
"depcheck",
"depcheckrc",
"destructiveignore",
"destructiveinclude",
"depcheck",
"emailservices",
"EMAILSERVICESFUNCTION",
"eslintcache",
"firstsha",
"Flexi",
"flexipage",
"flexipages",
"flowtest",
"flowtests",
"flowtype",
"forceignore",
"FORCEIGNORE",
"forceinclude",
"FORCEINCLUDE",
"friendlyname",
"FULLNAME",
"geodata",
"gitdir",
"hardlinks",
"iframe",
"Iframe",
"ignorewarnings",
"iife",
"indx",
"Infile",
"knip",
"lcov",
"linebreak",
"lintstagedrc",
"loglevel",
"lwcc",
"mdapi",
"megalinter",
"Mehdi",
"mehdisfdc",
"metafile",
"METAFILE",
"mjyhjbm",
"mkdirs",
"mocharc",
Expand All @@ -87,7 +96,6 @@
"mutingpermissionset",
"mutingpermissionsets",
"myexperiencebundle",
"Nimn",
"nonblock",
"notblank",
"notexist",
Expand All @@ -99,10 +107,8 @@
"oauthcustomscopes",
"oclif",
"omni",
"Omni",
"omnistudio",
"oxsecurity",
"Parens",
"pastsha",
"permissionset",
"permissionsetgroup",
Expand All @@ -121,17 +127,12 @@
"samlssoconfig",
"samlssoconfigs",
"scolladon",
"Scontrol",
"scontrols",
"Sebastien",
"sfdx",
"Sfdx",
"SFDX",
"sgdignore",
"sgdinclude",
"sgdincludedestructive",
"shellcheck",
"STATICRESOURCE",
"staticresources",
"stefanzweifel",
"struc",
Expand All @@ -140,17 +141,14 @@
"testkit",
"testlevel",
"testtest",
"Translationline",
"trivyignore",
"tsbuildinfo",
"unmanaged",
"unmocked",
"unpackaged",
"Unpackaged",
"venv",
"wagoid",
"wapp",
"Wavehandler",
"wcomp",
"wdash",
"wdpr",
Expand All @@ -160,6 +158,7 @@
"wireit",
"wlens",
"xmlbuilder",
"yarnrc"
"yarnrc",
"\u00c0gain"
]
}
25 changes: 0 additions & 25 deletions __tests__/unit/lib/metadata/MetadataRepositoryImpl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@ describe('MetadataRepositoryImpl', () => {
suffix: 'resource',
xmlName: 'StaticResource',
},
{
directoryName: 'emailservices',
inFolder: false,
metaFile: false,
suffix: 'xml',
xmlName: 'EmailServicesFunction',
},
])
})
describe('has', () => {
Expand Down Expand Up @@ -205,16 +198,6 @@ describe('MetadataRepositoryImpl', () => {
expect.objectContaining({ directoryName: 'moderation' })
)
})

it('matches `xml` files inside `emailservices` folder', () => {
// Act
const result = sut.get('force-app/emailservices/testService.xml')

// Assert
expect(result).toStrictEqual(
expect.objectContaining({ directoryName: 'emailservices' })
)
})
})

describe('when matching on extension', () => {
Expand Down Expand Up @@ -284,14 +267,6 @@ describe('MetadataRepositoryImpl', () => {
})

describe('when it should not match on extension', () => {
it('does not match `xml` files outside `emailservices` folder', () => {
// Act
const result = sut.get('manifest/specificTestClasses.xml')

// Assert
expect(result).toBeUndefined()
})

it('matches on folder', () => {
// Act
const result = sut.get(
Expand Down
1 change: 0 additions & 1 deletion src/constant/metadataConstants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict'

export const CUSTOM_APPLICATION_TYPE = 'applications'
export const EMAILSERVICESFUNCTION_SUFFIX = 'emailservices'
export const FIELD_DIRECTORY_NAME = 'fields'
export const FLOW_XML_NAME = 'Flow'
export const INFOLDER_SUFFIX = `Folder`
Expand Down
2 changes: 0 additions & 2 deletions src/metadata/MetadataRepositoryImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { parse } from 'path'
import { DOT, PATH_SEP } from '../constant/fsConstants'
import {
CUSTOM_APPLICATION_TYPE,
EMAILSERVICESFUNCTION_SUFFIX,
METAFILE_SUFFIX,
OBJECT_TRANSLATION_TYPE,
OBJECT_TYPE,
Expand Down Expand Up @@ -102,7 +101,6 @@ export class MetadataRepositoryImpl implements MetadataRepository {
private static EXTENSION_MATCHING_EXCEPTION = [
CUSTOM_APPLICATION_TYPE,
RESTRICTION_RULE_TYPE,
EMAILSERVICESFUNCTION_SUFFIX,
]

private static COMPOSED_TYPES = [
Expand Down

0 comments on commit 8b53c13

Please sign in to comment.