Skip to content

Commit 7cbdefc

Browse files
frostebiteclaude
andcommitted
refactor: rename enterprise services to plugin services
The orchestrator is a plugin, not an enterprise feature. Renamed loadEnterpriseServices -> loadPluginServices and all related variables, types, log messages, and test descriptions to use "plugin" terminology. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d6fcc2b commit 7cbdefc

File tree

8 files changed

+115
-121
lines changed

8 files changed

+115
-121
lines changed

dist/index.js

Lines changed: 35 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
2-
* Integration wiring tests for enterprise features in index.ts
2+
* Integration wiring tests for plugin features in index.ts
33
*
44
* These tests verify the conditional gating logic in runMain():
5-
* - Each enterprise feature is only invoked when its gate condition is met
5+
* - Each plugin feature is only invoked when its gate condition is met
66
* - Services are NOT called when their feature is disabled (the default)
77
* - The order of operations is correct (restore before build, save after build)
88
*/
@@ -92,12 +92,12 @@ const mockOrchestrator = {
9292
};
9393

9494
// Mock the orchestrator-plugin module to directly return our mock services.
95-
// This avoids any issues with dynamic imports inside loadEnterpriseServices().
95+
// This avoids any issues with dynamic imports inside loadPluginServices().
9696
jest.mock('./model/orchestrator-plugin', () => ({
9797
loadOrchestrator: jest.fn().mockResolvedValue({
9898
run: mockOrchestrator.run,
9999
}),
100-
loadEnterpriseServices: jest.fn().mockResolvedValue({
100+
loadPluginServices: jest.fn().mockResolvedValue({
101101
BuildReliabilityService: mockBuildReliabilityService,
102102
TestWorkflowService: mockTestWorkflowService,
103103
HotRunnerService: mockHotRunnerService,
@@ -115,7 +115,7 @@ jest.mock('./model/orchestrator-plugin', () => ({
115115
}),
116116
}));
117117

118-
// Mock all non-enterprise dependencies to isolate the wiring logic
118+
// Mock all non-plugin dependencies to isolate the wiring logic
119119
jest.mock('@actions/core');
120120
jest.mock('./model', () => ({
121121
Action: {
@@ -164,7 +164,7 @@ jest.mock('./model/platform-setup', () => ({
164164

165165
const mockedBuildParametersCreate = BuildParameters.create as jest.Mock;
166166

167-
interface EnterpriseBuildParametersOverrides {
167+
interface PluginBuildParametersOverrides {
168168
providerStrategy?: string;
169169
childWorkspacesEnabled?: boolean;
170170
childWorkspaceName?: string;
@@ -187,7 +187,7 @@ interface EnterpriseBuildParametersOverrides {
187187
gitHooksRunBeforeBuild?: string;
188188
}
189189

190-
function createMockBuildParameters(overrides: EnterpriseBuildParametersOverrides = {}) {
190+
function createMockBuildParameters(overrides: PluginBuildParametersOverrides = {}) {
191191
return {
192192
// Required base properties
193193
providerStrategy: 'local',
@@ -199,7 +199,7 @@ function createMockBuildParameters(overrides: EnterpriseBuildParametersOverrides
199199
branch: 'main',
200200
runnerTempPath: '/tmp',
201201

202-
// Enterprise features - all disabled by default
202+
// Plugin features - all disabled by default
203203
childWorkspacesEnabled: false,
204204
childWorkspaceName: '',
205205
childWorkspaceCacheRoot: '',
@@ -229,7 +229,7 @@ function createMockBuildParameters(overrides: EnterpriseBuildParametersOverrides
229229
* Since it calls `runMain()` at module scope, we need to re-import it
230230
* for each test. jest.isolateModules() handles this.
231231
*/
232-
async function runIndex(overrides: EnterpriseBuildParametersOverrides = {}): Promise<void> {
232+
async function runIndex(overrides: PluginBuildParametersOverrides = {}): Promise<void> {
233233
mockedBuildParametersCreate.mockResolvedValue(createMockBuildParameters(overrides));
234234

235235
return new Promise<void>((resolve) => {
@@ -249,7 +249,7 @@ async function runIndex(overrides: EnterpriseBuildParametersOverrides = {}): Pro
249249
// Tests
250250
// ---------------------------------------------------------------------------
251251

252-
describe('index.ts enterprise feature wiring', () => {
252+
describe('index.ts plugin feature wiring', () => {
253253
const originalPlatform = process.platform;
254254
const originalEnvironment = { ...process.env };
255255

@@ -625,7 +625,7 @@ describe('index.ts enterprise feature wiring', () => {
625625
// -----------------------------------------------------------------------
626626

627627
describe('non-local provider strategy', () => {
628-
it('should skip all enterprise features when providerStrategy is not local', async () => {
628+
it('should skip all plugin features when providerStrategy is not local', async () => {
629629
await runIndex({
630630
providerStrategy: 'aws',
631631
childWorkspacesEnabled: true,
@@ -636,7 +636,7 @@ describe('index.ts enterprise feature wiring', () => {
636636
gitHooksEnabled: true,
637637
});
638638

639-
// None of the enterprise services should be called because
639+
// None of the plugin services should be called because
640640
// they are inside the `if (providerStrategy === 'local')` block
641641
expect(mockChildWorkspaceService.buildConfig).not.toHaveBeenCalled();
642642
expect(mockSubmoduleProfileService.createInitPlan).not.toHaveBeenCalled();

0 commit comments

Comments
 (0)