-
Notifications
You must be signed in to change notification settings - Fork 130
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
on import link extensions make absolute urls relative #4877
base: main
Are you sure you want to change the base?
Conversation
1b3a211
to
ae2e639
Compare
packages/app/src/cli/services/admin-link/extension-to-toml.test.ts
Outdated
Show resolved
Hide resolved
b2d26db
to
bd01c9b
Compare
Coverage report
Show files with reduced coverage 🔻
Test suite run success1947 tests passing in 885 suites. Report generated by 🧪jest coverage report action from 83ee53c |
We detected some changes at packages/*/src and there are no updates in the .changeset. |
bd01c9b
to
5297a9c
Compare
95ec4f0
to
2a816ca
Compare
2a816ca
to
83ee53c
Compare
/snapit |
🫰✨ Thanks @alfonso-noriega! Your snapshot has been published to npm. Test the snapshot by intalling your package globally: pnpm i -g @shopify/[email protected]
|
WHY are these changes introduced?
The current process to create legacy link extensions in the partners dashboard enables to create non secure and external pointing absolute URLs for embedded apps. Those URLs are later on overwritten by core to point to the shop embedded app URL.
This behaviour fills the DB with incorrect URLs and the new CLI managed admin link extension is avoiding this pattern.
WHAT is this pull request doing?
To reduce friction on the partners migration, this code automatically ignores the domain of the embedded app legacy link extensions and transforms them into relative URLs.
How to test your changes?
From the CLI repo, checkout this branch.
Create a link extension in the partners dashboard with an absolute URL pointing to a random external domain (http://example.org/product).
In the CLI repo run the import extensions command:
pnpm shopify app import-extensions --path path-to-your-app
Select the admin links option
Check the the generated extension toml contains a url like
app://product
I've considered possible cross-platform impacts (Mac, Linux, Windows)
I've considered possible documentation changes