@@ -32,6 +32,10 @@ export interface CustomTransformationConfig {
3232}
3333
3434type ExtensionExperience = 'extension' | 'configuration'
35+
36+ export function isAppConfigSpecification ( spec : { experience : string } ) : boolean {
37+ return spec . experience === 'configuration'
38+ }
3539type UidStrategy = 'single' | 'dynamic' | 'uuid'
3640
3741export enum AssetIdentifier {
@@ -210,7 +214,13 @@ export function createExtensionSpecification<TConfiguration extends BaseConfigTy
210214 return {
211215 ...merged ,
212216 contributeToAppConfigurationSchema : ( appConfigSchema : ZodSchemaType < unknown > ) => {
213- if ( merged . uidStrategy !== 'single' ) {
217+ const isConfig = isAppConfigSpecification ( merged )
218+ const hasSchema = merged . schema . _def . shape !== undefined
219+ // This filters out webhook subscription specifications from contributing to the app configuration schema
220+ const hasSingleUidStrategy = merged . uidStrategy === 'single'
221+
222+ const canContribute = isConfig && hasSchema && hasSingleUidStrategy
223+ if ( ! canContribute ) {
214224 // no change
215225 return appConfigSchema
216226 }
@@ -268,13 +278,17 @@ export function createConfigExtensionSpecification<TConfiguration extends BaseCo
268278}
269279
270280export function createContractBasedModuleSpecification < TConfiguration extends BaseConfigType = BaseConfigType > (
271- spec : Pick < CreateExtensionSpecType < TConfiguration > , 'identifier' | 'appModuleFeatures' | 'buildConfig' > ,
281+ spec : Pick <
282+ CreateExtensionSpecType < TConfiguration > ,
283+ 'identifier' | 'appModuleFeatures' | 'buildConfig' | 'uidStrategy'
284+ > ,
272285) {
273286 return createExtensionSpecification ( {
274287 identifier : spec . identifier ,
275288 schema : zod . any ( { } ) as unknown as ZodSchemaType < TConfiguration > ,
276289 appModuleFeatures : spec . appModuleFeatures ,
277290 buildConfig : spec . buildConfig ?? { mode : 'none' } ,
291+ uidStrategy : spec . uidStrategy ,
278292 deployConfig : async ( config , directory ) => {
279293 let parsedConfig = configWithoutFirstClassFields ( config )
280294 if ( spec . appModuleFeatures ( ) . includes ( 'localization' ) ) {
0 commit comments