cli icon indicating copy to clipboard operation
cli copied to clipboard

Generate and deploy extensions

Open amcaplan opened this issue 1 year ago • 3 comments

WHY are these changes introduced?

Related to https://github.com/Shopify/develop-app-management/issues/1757 Fixes https://github.com/Shopify/develop-app-management/issues/1710

WHAT is this pull request doing?

Allows generating and deploying extensions. Includes:

  • Fetching extension specifications
  • Stub-out of template specifications (those will be addressed in a later PR)
  • Filling in UIDs in module TOMLs, and reading them for future deploys
  • Matching local and remote modules via UID
  • Pushing an extension bundle to cloud storage

(Generating a version already existed, now it'll work with extensions as well.)

Functions aren't expected to work yet, as uploading those artifacts is a bit different.

How to test your changes?

  1. Create an app
  2. shopify app generate extension (generate a few kinds, but no functions)
  3. shopify app deploy (confirm the diff looks correct)
  4. shopify app deploy again (confirm the diff shows no changes)
  5. Generate another extension, and deploy again (confirm the diff shows changes appropriately)
  6. Confirm that all extensions TOMLs have UIDs

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • [ ] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • [ ] Existing analytics will cater for this addition
  • [ ] PR includes analytics changes to measure impact

Checklist

  • [ ] I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • [ ] I've considered possible documentation changes
  • [ ] I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

amcaplan avatar Apr 16 '24 12:04 amcaplan

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/cli-foundations

github-actions[bot] avatar Apr 16 '24 12:04 github-actions[bot]

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟡 Statements 71.94% 7074/9833
🟡 Branches 68.93% 3514/5098
🟡 Functions 71.45% 1887/2641
🟡 Lines 73.25% 6663/9096

Test suite run success

1659 tests passing in 767 suites.

Report generated by 🧪jest coverage report action from bc97fb698b5e02b426697ec2e97b6bf0a0ea3555

github-actions[bot] avatar Apr 17 '24 12:04 github-actions[bot]

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset. If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

github-actions[bot] avatar Apr 22 '24 13:04 github-actions[bot]