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

Use foundry-config-json in widget-manifest-vite-plugin #1055

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tzyl
Copy link
Contributor

@tzyl tzyl commented Dec 11, 2024

Based on top of #1054

Replace manual package json auto version strategy and foundry config json parsing in @osdk/widget-manifest-vite-plugin with the shared @osdk/foundry-config-json package. This means we can use the git describe strategy now for populating the manifest at build time.

for (
const [template, sdkVersion] of [
...templatesWithSdkVersions(TEMPLATES),
...templatesWithSdkVersions(WIDGET_TEMPLATES),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were a bunch of places here not applying properly to the widget templates so weren't actually beingg enforced at CI time

@@ -159,7 +154,7 @@ export function FoundryWidgetVitePlugin(options: Options = {}): Plugin {
body += readResult;
}
});
req.on("end", () => {
req.on("end", async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this works hoping you'll take over for dev mode

@@ -508,7 +488,7 @@ export function FoundryWidgetVitePlugin(options: Options = {}): Plugin {
}))
: [],
rid: entrypointFileIdToConfigMap[chunk.facadeModuleId].rid,
version: packageJsonFile.version ?? "0.0.0",
version: widgetVersion,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be fine, running build on the examples package does generate the manifest in the dist folder

@tzyl tzyl force-pushed the tl/split-foundry-config-json branch from 39cabf7 to 780ad87 Compare December 12, 2024 10:16
@tzyl tzyl force-pushed the tl/manifest-plugin-git-describe-strategy branch from f2ec00d to 4cc9cf0 Compare December 12, 2024 10:27
Base automatically changed from tl/split-foundry-config-json to main December 12, 2024 14:28
@tzyl tzyl force-pushed the tl/manifest-plugin-git-describe-strategy branch from 4cc9cf0 to d1adf86 Compare December 12, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants