From f8b69854bbed6188c1d7a5e1807a4e946136f833 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 19 Dec 2024 16:45:35 +0200 Subject: [PATCH] Use the auto-generated UID for asset upload path If this is the first time deploying and there is no UID, the autogenerated UID won't yet be found in `module.configuration`. All singleton shopify.app.toml-based extensions don't need assets, so even though they should technically use module.handle here, it basically doesn't matter. And for all other extension types, `module.uid` is the correct value to use here. --- packages/app/src/cli/models/app/app.ts | 2 +- packages/app/src/cli/services/deploy/bundle.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app/src/cli/models/app/app.ts b/packages/app/src/cli/models/app/app.ts index c423aa0d36..395dde1311 100644 --- a/packages/app/src/cli/models/app/app.ts +++ b/packages/app/src/cli/models/app/app.ts @@ -355,7 +355,7 @@ export class App< type: module.externalType, handle: module.handle, uid: module.uid, - assets: module.configuration.uid ?? module.handle, + assets: module.uid, target: module.contextValue, config: (config ?? {}) as JsonMapType, } diff --git a/packages/app/src/cli/services/deploy/bundle.test.ts b/packages/app/src/cli/services/deploy/bundle.test.ts index 72c1faa0ab..c35c5db44f 100644 --- a/packages/app/src/cli/services/deploy/bundle.test.ts +++ b/packages/app/src/cli/services/deploy/bundle.test.ts @@ -40,7 +40,7 @@ describe('bundleAndBuildExtensions', () => { type: 'web_pixel_extension_external', handle: 'test-ui-extension', uid: 'test-ui-extension-uid', - assets: 'test-ui-extension', + assets: 'test-ui-extension-uid', target: '', config: {}, }, @@ -48,7 +48,7 @@ describe('bundleAndBuildExtensions', () => { type: 'theme_external', handle: 'theme-extension-name', uid: themeExtension.uid, - assets: 'theme-extension-name', + assets: themeExtension.uid, target: '', config: { theme_extension: {