Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c65984a to
bf92dc4
Compare
96d95ba to
d8b0d4a
Compare
6e09feb to
5c1ddf1
Compare
d8b0d4a to
f042d96
Compare
5c1ddf1 to
06dee38
Compare
06dee38 to
40bf3e5
Compare
8cc6cc8 to
cc438ef
Compare
91e9fca to
a6d5ab9
Compare
19ce420 to
5b58638
Compare
| }) | ||
| // Try the extension's build output first (for compiled bundles), then fall back | ||
| // to the extension's source directory (for static assets like tools, instructions). | ||
| const buildPath = joinPath(extension.directory, extension.outputRelativePath) |
There was a problem hiding this comment.
@isaacroldan this fixes the issue mentioned here. There was a regression where we were getting updates even when the assets fail to build because we were serving them from the .dev-bundle which gets freshly created even when the build fails but it should be using the local assets. When the build fails the old local assets should not be deleted and we should not get a new update event in the websocket
There was a problem hiding this comment.
Nope, never mind. I double checked and it still sends an update event, something else is going on
| // destination instead, it would pick up files accumulated from previous builds | ||
| // that may no longer exist in the source, inflating the file count and producing | ||
| // stale entries in the manifest's pathMap. | ||
| const sourceFiles = await glob(['**/*'], {cwd: fullPath, absolute: false}) |
There was a problem hiding this comment.
Previously this was looking at copied files which broke when including assets for the adminspecificaiton after I fixed the issue where files were getting a new name on every build in dev even when there was no collision.
Fixed this to match copy-by-pattern.ts by looking at the source files, not the files in the destination folder.
| // destination instead, it would pick up files accumulated from previous builds | ||
| // that may no longer exist in the source, inflating the file count and producing | ||
| // stale entries in the manifest. | ||
| const sourceFiles = await glob(['**/*'], {cwd: sourcePath, absolute: false}) |
There was a problem hiding this comment.
Same here, fixed this to match copy-by-pattern.ts by looking at the source files, not the files in the destination folder.
5b58638 to
8549387
Compare
17e3ff5 to
c2c3f95
Compare
34150b4 to
5c1736d
Compare
Include built assets in the manifest.json Allow serving static assets from the extensions directory
8cfce51 to
a65c60d
Compare
…ore copying over to the bundle Remove copy_static_assets client step completely. It was doing nothing for specifications that were not ui_extension. ui_extension now has its own steps for including static assets
a65c60d to
de5e9d9
Compare

WHY are these changes introduced?
This change modernizes the UI extension asset handling system by replacing the legacy
build_manifestapproach with a new manifest.json-based system that supports additional asset types including intents.Related https://github.com/shop/issues-admin-extensibility/issues/2274
WHAT is this pull request doing?
intentsfield in extension point schemas with type, action, schema, name, and description propertiesIntentsto theAssetIdentifierenum for asset handlinginclude_assetsstep instead ofcopy_static_assets, with support for tools, instructions, and intent schemasHow to test your changes?
Make sure you have the proper betas applied (see canvas)
shopify app generate --template conditional_admin_actionpnpm shopify app devand verify the the UI extension has assets (main.js, should_render.js, tools schema url and instructions.md) that are fetchable through the Dev Server. You should be able to preview it in Admin Webshopify app generate --template admin_intent_linkpnpm shopify app devand verify the the Admin link extension has assets (main.js, tools schema url and instructions.md and intents schema URLs) fetchable through the Dev ServerMeasuring impact
How do we know this change was effective? Please choose one:
Checklist