Skip to content

Commit

Permalink
Remove unused property
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacroldan committed Oct 18, 2024
1 parent a32b531 commit 710cc73
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export interface PatchTomlOptions {
* @param path - The path to the app/extension configuration file.
* @param patch - The patch to apply to the app/extension configuration file.
* @param schema - The schema to validate the patch against. If not provided, the toml will not be validated.
* @param includeAppDefaultComments - Include the default comments at the top of the app config file. Only relevant for app config files.
*/
export async function patchAppConfigurationFile({path, patch, schema}: PatchTomlOptions) {
const tomlContents = await readFile(path)
Expand Down
14 changes: 2 additions & 12 deletions packages/app/src/cli/services/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,7 @@ export async function ensureDevContext(options: DevContextOptions): Promise<DevC
localApp.configuration = newConfiguration

const patch = {build: {dev_store_url: selectedStore?.shopDomain}}
await patchAppConfigurationFile({
path: configuration.path,
patch,
schema: localApp.configSchema,
includeAppDefaultComments: true,
})
await patchAppConfigurationFile({path: configuration.path, patch, schema: localApp.configSchema})
} else if (!cachedInfo || rightApp) {
setCachedAppInfo({
appId: selectedApp.apiKey,
Expand Down Expand Up @@ -406,12 +401,7 @@ async function promptIncludeConfigOnDeploy(options: ShouldOrPromptIncludeConfigD
}

const patch = {build: {include_config_on_deploy: shouldIncludeConfigDeploy}}
await patchAppConfigurationFile({
path: localConfiguration.path,
patch,
schema: options.localApp.configSchema,
includeAppDefaultComments: true,
})
await patchAppConfigurationFile({path: localConfiguration.path, patch, schema: options.localApp.configSchema})
await metadata.addPublicMetadata(() => ({cmd_deploy_confirm_include_config_used: shouldIncludeConfigDeploy}))
}

Expand Down
15 changes: 3 additions & 12 deletions packages/app/src/cli/services/dev/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,7 @@ export async function updateURLs(
: {}),
}

await patchAppConfigurationFile({
path: localApp.configuration.path,
patch,
schema: localApp.configSchema,
includeAppDefaultComments: true,
})
await patchAppConfigurationFile({path: localApp.configuration.path, patch, schema: localApp.configSchema})
}
}

Expand Down Expand Up @@ -270,12 +265,8 @@ export async function shouldOrPromptUpdateURLs(options: ShouldOrPromptUpdateURLs
automatically_update_urls_on_dev: shouldUpdateURLs,
}
const patch = {build: {automatically_update_urls_on_dev: shouldUpdateURLs}}
await patchAppConfigurationFile({
path: options.localApp.configuration.path,
patch,
schema: options.localApp.configSchema,
includeAppDefaultComments: true,
})
const path = options.localApp.configuration.path
await patchAppConfigurationFile({path, patch, schema: options.localApp.configSchema})
} else {
setCachedAppInfo({directory: options.appDirectory, updateURLs: shouldUpdateURLs})
}
Expand Down

0 comments on commit 710cc73

Please sign in to comment.