Skip to content

Commit c5fae9c

Browse files
committed
Fix TypeScript compilation errors for Docker host binding feature
- Add missing directory and update properties to DevOptions test objects - Add missing config property to TestAppWithConfigOptions calls - Add missing partnerUrlsUpdated property to DevConfig setupDevProcesses calls - Update CLI documentation and manifest for --host flag
1 parent 700021a commit c5fae9c

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

packages/app/src/cli/services/dev/processes/setup-dev-processes.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ describe('setup-dev-processes', () => {
313313
skipDependenciesInstallation: false,
314314
tunnel: {mode: 'auto'},
315315
host: '0.0.0.0', // Docker host setting
316+
directory: '',
317+
update: false,
316318
}
317319
const network: DevConfig['network'] = {
318320
proxyUrl: 'https://example.com/proxy',
@@ -332,6 +334,7 @@ describe('setup-dev-processes', () => {
332334

333335
// Create simple app without theme extensions to avoid the theme API calls
334336
const localApp = testAppWithConfig({
337+
config: {},
335338
app: testAppLinked({
336339
allExtensions: [await testUIExtension({type: 'web_pixel_extension'})],
337340
webs: [{
@@ -359,6 +362,7 @@ describe('setup-dev-processes', () => {
359362
storeId,
360363
commandOptions,
361364
network,
365+
partnerUrlsUpdated: true,
362366
graphiqlPort,
363367
})
364368

@@ -392,7 +396,7 @@ describe('setup-dev-processes', () => {
392396
redirectUrlWhitelist: ['https://example.com/redirect'],
393397
},
394398
}
395-
const localApp = testAppWithConfig()
399+
const localApp = testAppWithConfig({config: {}})
396400
vi.spyOn(loader, 'reloadApp').mockResolvedValue(localApp)
397401

398402
const remoteApp: DevConfig['remoteApp'] = {

packages/cli/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ Run the app.
212212

213213
```
214214
USAGE
215-
$ shopify app dev [--checkout-cart-url <value>] [--client-id <value> | -c <value>] [--localhost-port
216-
<value>] [--no-color] [--no-update] [--notify <value>] [--path <value>] [--reset | ]
215+
$ shopify app dev [--checkout-cart-url <value>] [--client-id <value> | -c <value>] [--host <value>]
216+
[--localhost-port <value>] [--no-color] [--no-update] [--notify <value>] [--path <value>] [--reset | ]
217217
[--skip-dependencies-installation] [-s <value>] [--subscription-product-url <value>] [-t <value>]
218218
[--theme-app-extension-port <value>] [--use-localhost | [--tunnel-url <value> | ]] [--verbose]
219219
@@ -224,6 +224,8 @@ FLAGS
224224
--checkout-cart-url=<value> Resource URL for checkout UI extension. Format:
225225
"/cart/{productVariantID}:{productQuantity}"
226226
--client-id=<value> The Client ID of your app.
227+
--host=<value> [default: localhost] Set which network interface the web server listens on.
228+
The default value is localhost.
227229
--localhost-port=<value> Port to use for localhost.
228230
--no-color Disable color output.
229231
--no-update Skips the Partners Dashboard URL update step.

packages/cli/oclif.manifest.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,15 @@
459459
"name": "graphiql-port",
460460
"type": "option"
461461
},
462+
"host": {
463+
"default": "localhost",
464+
"description": "Set which network interface the web server listens on. The default value is localhost.",
465+
"env": "SHOPIFY_FLAG_HOST",
466+
"hasDynamicHelp": false,
467+
"multiple": false,
468+
"name": "host",
469+
"type": "option"
470+
},
462471
"localhost-port": {
463472
"description": "Port to use for localhost.",
464473
"env": "SHOPIFY_FLAG_LOCALHOST_PORT",

0 commit comments

Comments
 (0)