-
Notifications
You must be signed in to change notification settings - Fork 103
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
feat: Adds a new metadata bundle type for AppFrameworkTemplates #1442
Merged
WillieRuemmele
merged 7 commits into
forcedotcom:main
from
rvwatch:rv/add-appframeworktemplatebundle
Oct 28, 2024
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5869762
feat(appFrameworkTemplateBundle): add support for appFrameworkTemplat…
rvwatch 3854e41
feat(appFrameworkTemplateBundle): add empty obj layout.json files
rvwatch c3831e8
feat(appFrameworkTemplateBundle): add straight empty layout.json files
rvwatch 425fdbb
feat(appFrameworkTemplateBundle): trying to fix the layout.json test …
rvwatch 169300d
feat(appFrameworkTemplateBundle): {} layout.json
rvwatch 656608f
feat(appFrameworkTemplateBundle): {} with another line layout.json
rvwatch e9f3a6a
feat(appFrameworkTemplateBundle): update type to string, string[] ins…
rvwatch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ppTemplates/__snapshots__/verify-md-files.expected/appTemplates/test_template/layout.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
11 changes: 11 additions & 0 deletions
11
...ates/__snapshots__/verify-md-files.expected/appTemplates/test_template/template-info.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"templateType": "App", | ||
"label": "my test template", | ||
"name": "test_template", | ||
"namespace": null, | ||
"assetVersion": 63.0, | ||
"maxAppCount": null, | ||
"layoutDefinition": "layout.json", | ||
"tags": {}, | ||
"chainDefinitions": [] | ||
} |
8 changes: 8 additions & 0 deletions
8
test/snapshot/sampleProjects/appTemplates/__snapshots__/verify-md-files.expected/package.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<types> | ||
<members>force-app</members> | ||
<name>AppFrameworkTemplateBundle</name> | ||
</types> | ||
<version>62.0</version> | ||
</Package> |
1 change: 1 addition & 0 deletions
1
...erify-source-files.expected/force-app/main/default/appTemplates/test_template/layout.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
11 changes: 11 additions & 0 deletions
11
...ource-files.expected/force-app/main/default/appTemplates/test_template/template-info.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"templateType": "App", | ||
"label": "my test template", | ||
"name": "test_template", | ||
"namespace": null, | ||
"assetVersion": 63.0, | ||
"maxAppCount": null, | ||
"layoutDefinition": "layout.json", | ||
"tags": {}, | ||
"chainDefinitions": [] | ||
} |
1 change: 1 addition & 0 deletions
1
...snapshot/sampleProjects/appTemplates/originalMdapi/appTemplates/test_template/layout.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
11 changes: 11 additions & 0 deletions
11
...t/sampleProjects/appTemplates/originalMdapi/appTemplates/test_template/template-info.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"templateType": "App", | ||
"label": "my test template", | ||
"name": "test_template", | ||
"namespace": null, | ||
"assetVersion": 63.0, | ||
"maxAppCount": null, | ||
"layoutDefinition": "layout.json", | ||
"tags": {}, | ||
"chainDefinitions": [] | ||
} |
11 changes: 11 additions & 0 deletions
11
test/snapshot/sampleProjects/appTemplates/sfdx-project.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"packageDirectories": [ | ||
{ | ||
"default": true, | ||
"path": "force-app" | ||
} | ||
], | ||
"name": "appTemplatesTestProject", | ||
"namespace": "", | ||
"sourceApiVersion": "62.0" | ||
} |
53 changes: 53 additions & 0 deletions
53
test/snapshot/sampleProjects/appTemplates/snapshots.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright (c) 2024, salesforce.com, inc. | ||
* All rights reserved. | ||
* Licensed under the BSD 3-Clause license. | ||
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
import * as fs from 'node:fs'; | ||
import * as path from 'node:path'; | ||
import { | ||
FORCE_APP, | ||
MDAPI_OUT, | ||
dirsAreIdentical, | ||
fileSnap, | ||
mdapiToSource, | ||
sourceToMdapi, | ||
} from '../../helper/conversions'; | ||
|
||
// we don't want failing tests outputting over each other | ||
/* eslint-disable no-await-in-loop */ | ||
|
||
describe('appTemplates', () => { | ||
const testDir = path.join('test', 'snapshot', 'sampleProjects', 'appTemplates'); | ||
let sourceFiles: string[]; | ||
let mdFiles: string[]; | ||
|
||
before(async () => { | ||
sourceFiles = await mdapiToSource(testDir); | ||
mdFiles = await sourceToMdapi(testDir); | ||
}); | ||
|
||
it('verify source files', async () => { | ||
for (const file of sourceFiles) { | ||
await fileSnap(file, testDir); | ||
} | ||
dirsAreIdentical( | ||
path.join(testDir, FORCE_APP), | ||
path.join(testDir, '__snapshots__', 'verify-source-files.expected', FORCE_APP) | ||
); | ||
}); | ||
|
||
it('verify md files', async () => { | ||
for (const file of mdFiles) { | ||
await fileSnap(file, testDir); | ||
} | ||
}); | ||
|
||
after(async () => { | ||
await Promise.all([ | ||
fs.promises.rm(path.join(testDir, FORCE_APP), { recursive: true, force: true }), | ||
fs.promises.rm(path.join(testDir, MDAPI_OUT), { recursive: true, force: true }), | ||
]); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only added this guy. Scripts added the rest.