Skip to content

Commit dbe5497

Browse files
isaacroldanClaude Code
andcommitted
Fix loader tests for admin config extension and pass through devSessionWatchConfig
Co-authored-by: Claude Code <claude-code@anthropic.com>
1 parent b6a0cfc commit dbe5497

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

packages/app/src/cli/models/app/loader.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,9 +2070,12 @@ describe('load', () => {
20702070
const app = await loadTestingApp()
20712071

20722072
// Then
2073-
expect(app.allExtensions).toHaveLength(6)
2073+
expect(app.allExtensions).toHaveLength(7)
20742074
const extensionsConfig = app.allExtensions.map((ext) => ext.configuration)
20752075
expect(extensionsConfig).toEqual([
2076+
expect.objectContaining({
2077+
name: 'for-testing',
2078+
}),
20762079
expect.objectContaining({
20772080
name: 'for-testing',
20782081
}),
@@ -2128,9 +2131,12 @@ describe('load', () => {
21282131
const app = await loadTestingApp({remoteFlags: []})
21292132

21302133
// Then
2131-
expect(app.allExtensions).toHaveLength(7)
2134+
expect(app.allExtensions).toHaveLength(8)
21322135
const extensionsConfig = app.allExtensions.map((ext) => ext.configuration)
21332136
expect(extensionsConfig).toEqual([
2137+
{
2138+
name: 'for-testing-webhooks',
2139+
},
21342140
{
21352141
name: 'for-testing-webhooks',
21362142
},

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,8 @@ export class ExtensionInstance<TConfiguration extends BaseConfigType = BaseConfi
458458
if (!watchConfig) {
459459
const importedFiles = this.scanImports()
460460
watchedFiles.push(...importedFiles)
461+
const wildcard = joinPath(this.directory, '**/*')
462+
watchedFiles.push(wildcard)
461463
}
462464

463465
return [...new Set(watchedFiles.map((file) => normalizePath(file)))]

packages/app/src/cli/models/extensions/specification.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ export function createContractBasedModuleSpecification<TConfiguration extends Ba
320320
clientSteps: spec.clientSteps,
321321
uidStrategy: spec.uidStrategy,
322322
transformRemoteToLocal: spec.transformRemoteToLocal,
323+
devSessionWatchConfig: spec.devSessionWatchConfig,
323324
deployConfig: async (config, directory) => {
324325
let parsedConfig = configWithoutFirstClassFields(config)
325326
if (spec.appModuleFeatures().includes('localization')) {

0 commit comments

Comments
 (0)