Skip to content

Commit e6f3577

Browse files
Add client steps implementation to support existing functionalities
1 parent bbc0817 commit e6f3577

6 files changed

Lines changed: 887 additions & 2 deletions

File tree

packages/app/src/cli/models/extensions/extension-instance.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const CONFIG_EXTENSION_IDS: string[] = [
4444
WebhookSubscriptionSpecIdentifier,
4545
WebhooksSpecIdentifier,
4646
EventsSpecIdentifier,
47+
'admin',
4748
]
4849

4950
/**
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type {ClientStep, BuildContext} from '../client-steps.js'
2+
3+
/**
4+
* Executes a copy_static_assets build step.
5+
*
6+
* Copies static assets defined in the extension's build_manifest to the output directory.
7+
* This is a no-op for extensions that do not define static assets.
8+
*/
9+
export async function executeCopyStaticAssetsStep(_step: ClientStep, context: BuildContext): Promise<void> {
10+
return context.extension.copyStaticAssets()
11+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import {touchFile, writeFile} from '@shopify/cli-kit/node/fs'
2+
import type {ClientStep, BuildContext} from '../client-steps.js'
3+
4+
/**
5+
* Executes a create_tax_stub build step.
6+
*
7+
* Creates a minimal JavaScript stub file at the extension's output path,
8+
* satisfying the tax calculation extension bundle format.
9+
*/
10+
export async function executeCreateTaxStubStep(_step: ClientStep, context: BuildContext): Promise<void> {
11+
const {extension} = context
12+
await touchFile(extension.outputPath)
13+
await writeFile(extension.outputPath, '(()=>{})();')
14+
}

0 commit comments

Comments
 (0)