@@ -13,7 +13,7 @@ import {
1313 loadHiddenConfig ,
1414} from './loader.js'
1515import { parseHumanReadableError } from './error-parsing.js'
16- import { App , AppInterface , AppLinkedInterface , AppSchema , WebConfigurationSchema } from './app.js'
16+ import { App , AppConfiguration , AppInterface , AppLinkedInterface , AppSchema , WebConfigurationSchema } from './app.js'
1717import { DEFAULT_CONFIG , buildVersionedAppSchema , getWebhookConfig } from './app.test-data.js'
1818import { ExtensionInstance } from '../extensions/extension-instance.js'
1919import { configurationFileNames , blocks } from '../../constants.js'
@@ -2908,8 +2908,7 @@ describe('parseConfigurationObject', () => {
29082908 const abortOrReport = vi . fn ( )
29092909
29102910 const { schema} = await buildVersionedAppSchema ( )
2911- const { path, ...toParse } = configurationObject
2912- await parseConfigurationObject ( schema , 'tmp' , toParse , abortOrReport )
2911+ await parseConfigurationObject ( schema , 'tmp' , configurationObject , abortOrReport )
29132912
29142913 expect ( abortOrReport ) . toHaveBeenCalledWith ( expectedFormatted , { } , 'tmp' )
29152914 } )
@@ -3479,7 +3478,7 @@ describe('WebhooksSchema', () => {
34793478 ) } in tmp:\n\n${ parseHumanReadableError ( err ) } `
34803479 const abortOrReport = vi . fn ( )
34813480
3482- const { path , ... toParse } = getWebhookConfig ( webhookConfigOverrides )
3481+ const toParse = getWebhookConfig ( webhookConfigOverrides )
34833482 const parsedConfiguration = await parseConfigurationObject ( WebhooksSchema , 'tmp' , toParse , abortOrReport )
34843483 return { abortOrReport, expectedFormatted, parsedConfiguration}
34853484 }
@@ -3491,7 +3490,6 @@ describe('getAppConfigurationState', () => {
34913490 `client_id="abcdef"` ,
34923491 {
34933492 basicConfiguration : {
3494- path : expect . stringMatching ( / s h o p i f y .a p p .t o m l $ / ) ,
34953493 client_id : 'abcdef' ,
34963494 } ,
34973495 isLinked : true ,
@@ -3502,7 +3500,6 @@ describe('getAppConfigurationState', () => {
35023500 something_extra="keep"` ,
35033501 {
35043502 basicConfiguration : {
3505- path : expect . stringMatching ( / s h o p i f y .a p p .t o m l $ / ) ,
35063503 client_id : 'abcdef' ,
35073504 something_extra : 'keep' ,
35083505 } ,
@@ -3513,7 +3510,6 @@ describe('getAppConfigurationState', () => {
35133510 `client_id=""` ,
35143511 {
35153512 basicConfiguration : {
3516- path : expect . stringMatching ( / s h o p i f y .a p p .t o m l $ / ) ,
35173513 client_id : '' ,
35183514 } ,
35193515 isLinked : false ,
@@ -3692,9 +3688,8 @@ describe('loadHiddenConfig', () => {
36923688 await inTemporaryDirectory ( async ( tmpDir ) => {
36933689 // Given
36943690 const configuration = {
3695- path : joinPath ( tmpDir , 'shopify.app.toml' ) ,
36963691 client_id : '12345' ,
3697- }
3692+ } as AppConfiguration
36983693 await writeFile ( joinPath ( tmpDir , '.gitignore' ) , '' )
36993694
37003695 // When
@@ -3714,9 +3709,8 @@ describe('loadHiddenConfig', () => {
37143709 await inTemporaryDirectory ( async ( tmpDir ) => {
37153710 // Given
37163711 const configuration = {
3717- path : joinPath ( tmpDir , 'shopify.app.toml' ) ,
37183712 client_id : '12345' ,
3719- }
3713+ } as AppConfiguration
37203714 const hiddenConfigPath = joinPath ( tmpDir , '.shopify' , 'project.json' )
37213715 await mkdir ( dirname ( hiddenConfigPath ) )
37223716 await writeFile (
@@ -3739,9 +3733,8 @@ describe('loadHiddenConfig', () => {
37393733 await inTemporaryDirectory ( async ( tmpDir ) => {
37403734 // Given
37413735 const configuration = {
3742- path : joinPath ( tmpDir , 'shopify.app.toml' ) ,
37433736 client_id : 'not-found' ,
3744- }
3737+ } as AppConfiguration
37453738 const hiddenConfigPath = joinPath ( tmpDir , '.shopify' , 'project.json' )
37463739 await mkdir ( dirname ( hiddenConfigPath ) )
37473740 await writeFile (
@@ -3763,9 +3756,8 @@ describe('loadHiddenConfig', () => {
37633756 await inTemporaryDirectory ( async ( tmpDir ) => {
37643757 // Given
37653758 const configuration = {
3766- path : joinPath ( tmpDir , 'shopify.app.toml' ) ,
37673759 client_id : 'not-found' ,
3768- }
3760+ } as AppConfiguration
37693761 const hiddenConfigPath = joinPath ( tmpDir , '.shopify' , 'project.json' )
37703762 await mkdir ( dirname ( hiddenConfigPath ) )
37713763 await writeFile (
@@ -3787,9 +3779,8 @@ describe('loadHiddenConfig', () => {
37873779 await inTemporaryDirectory ( async ( tmpDir ) => {
37883780 // Given
37893781 const configuration = {
3790- path : joinPath ( tmpDir , 'shopify.app.toml' ) ,
37913782 client_id : '12345' ,
3792- }
3783+ } as AppConfiguration
37933784 const hiddenConfigPath = joinPath ( tmpDir , '.shopify' , 'project.json' )
37943785 await mkdir ( dirname ( hiddenConfigPath ) )
37953786 await writeFile ( hiddenConfigPath , 'invalid json' )
0 commit comments