Skip to content

Commit dc6e820

Browse files
committed
K12
Signed-off-by: Jeromy Cannon <[email protected]>
1 parent d8dd69c commit dc6e820

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

src/commands/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export abstract class BaseCommand extends ShellRunner {
3939

4040
constructor(opts: Opts) {
4141
if (!opts || !opts.helm) throw new Error('An instance of core/Helm is required');
42-
if (!opts || !opts.K0012) throw new Error('An instance of core/K0018 is required');
42+
if (!opts || !opts.k8Factory) throw new Error('An instance of core/K0018 is required');
4343
if (!opts || !opts.chartManager) throw new Error('An instance of core/ChartManager is required');
4444
if (!opts || !opts.configManager) throw new Error('An instance of core/ConfigManager is required');
4545
if (!opts || !opts.depManager) throw new Error('An instance of core/DependencyManager is required');

src/commands/cluster/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class ClusterCommand extends BaseCommand {
2121

2222
this.handlers = new ClusterCommandHandlers(
2323
this,
24-
new ClusterCommandTasks(this, this.K0012),
24+
new ClusterCommandTasks(this, this.k8Factory),
2525
this.remoteConfigManager,
2626
);
2727
}

src/commands/deployment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class DeploymentCommand extends BaseCommand {
2727
constructor(opts: Opts) {
2828
super(opts);
2929

30-
this.tasks = new ClusterCommandTasks(this, this.K0012);
30+
this.tasks = new ClusterCommandTasks(this, this.k8Factory);
3131
}
3232

3333
private static get DEPLOY_FLAGS_LIST(): CommandFlag[] {
@@ -88,7 +88,7 @@ export class DeploymentCommand extends BaseCommand {
8888
},
8989
},
9090
this.setupHomeDirectoryTask(),
91-
this.localConfig.promptLocalConfigTask(self.K0012),
91+
this.localConfig.promptLocalConfigTask(self.k8Factory),
9292
{
9393
title: 'Add new deployment to local config',
9494
task: async (ctx, task) => {

src/commands/network.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class NetworkCommand extends BaseCommand {
8484
constructor(opts: Opts) {
8585
super(opts);
8686

87-
if (!opts || !opts.K0012) throw new Error('An instance of core/K0018 is required');
87+
if (!opts || !opts.k8Factory) throw new Error('An instance of core/K0018 is required');
8888
if (!opts || !opts.keyManager)
8989
throw new IllegalArgumentError('An instance of core/KeyManager is required', opts.keyManager);
9090
if (!opts || !opts.platformInstaller)

src/commands/node/configs.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const prepareUpgradeConfigBuilder = async function (argv, ctx, task) {
5959

6060
config.namespace = await resolveNamespaceFromDeployment(this.parent.localConfig, this.configManager, task);
6161

62-
await initializeSetup(config, this.K0012);
62+
await initializeSetup(config, this.k8Factory);
6363
config.nodeClient = await this.accountManager.loadNodeClient(config.namespace);
6464

6565
const accountKeys = await this.accountManager.getAccountKeysFromSecret(FREEZE_ADMIN_ACCOUNT, config.namespace);
@@ -78,7 +78,7 @@ export const downloadGeneratedFilesConfigBuilder = async function (argv, ctx, ta
7878

7979
config.namespace = await resolveNamespaceFromDeployment(this.parent.localConfig, this.configManager, task);
8080
config.existingNodeAliases = [];
81-
await initializeSetup(config, this.K0012);
81+
await initializeSetup(config, this.k8Factory);
8282

8383
return config;
8484
};
@@ -100,7 +100,7 @@ export const upgradeConfigBuilder = async function (argv, ctx, task, shouldLoadN
100100
config.existingNodeAliases = [];
101101
config.nodeAliases = helpers.parseNodeAliases(config.nodeAliasesUnparsed);
102102

103-
await initializeSetup(config, this.K0012);
103+
await initializeSetup(config, this.k8Factory);
104104

105105
// set config in the context for later tasks to use
106106
ctx.config = config;
@@ -138,7 +138,7 @@ export const updateConfigBuilder = async function (argv, ctx, task, shouldLoadNo
138138
config.curDate = new Date();
139139
config.existingNodeAliases = [];
140140

141-
await initializeSetup(config, this.K0012);
141+
await initializeSetup(config, this.k8Factory);
142142

143143
// set config in the context for later tasks to use
144144
ctx.config = config;
@@ -183,7 +183,7 @@ export const deleteConfigBuilder = async function (argv, ctx, task, shouldLoadNo
183183
config.existingNodeAliases = [];
184184
config.namespace = await resolveNamespaceFromDeployment(this.parent.localConfig, this.configManager, task);
185185

186-
await initializeSetup(config, this.K0012);
186+
await initializeSetup(config, this.k8Factory);
187187

188188
// set config in the context for later tasks to use
189189
ctx.config = config;
@@ -234,7 +234,7 @@ export const addConfigBuilder = async function (argv, ctx, task, shouldLoadNodeC
234234
config.curDate = new Date();
235235
config.existingNodeAliases = [];
236236

237-
await initializeSetup(config, this.K0012);
237+
await initializeSetup(config, this.k8Factory);
238238

239239
// set config in the context for later tasks to use
240240
ctx.config = config;
@@ -293,7 +293,7 @@ export const refreshConfigBuilder = async function (argv, ctx, task) {
293293
ctx.config.namespace = await resolveNamespaceFromDeployment(this.parent.localConfig, this.configManager, task);
294294
ctx.config.nodeAliases = helpers.parseNodeAliases(ctx.config.nodeAliasesUnparsed);
295295

296-
await initializeSetup(ctx.config, this.K0012);
296+
await initializeSetup(ctx.config, this.k8Factory);
297297

298298
return ctx.config;
299299
};
@@ -353,7 +353,7 @@ export const setupConfigBuilder = async function (argv, ctx, task) {
353353
config.namespace = await resolveNamespaceFromDeployment(this.parent.localConfig, this.configManager, task);
354354
config.nodeAliases = helpers.parseNodeAliases(config.nodeAliasesUnparsed);
355355

356-
await initializeSetup(config, this.K0012);
356+
await initializeSetup(config, this.k8Factory);
357357

358358
// set config in the context for later tasks to use
359359
ctx.config = config;

src/commands/node/handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class NodeCommandHandlers implements CommandHandlers {
6464
if (!opts || !opts.configManager) throw new Error('An instance of core/ConfigManager is required');
6565
if (!opts || !opts.logger) throw new Error('An instance of core/Logger is required');
6666
if (!opts || !opts.tasks) throw new Error('An instance of NodeCommandTasks is required');
67-
if (!opts || !opts.K0012) throw new Error('An instance of core/K0018 is required');
67+
if (!opts || !opts.k8Factory) throw new Error('An instance of core/K0018 is required');
6868
if (!opts || !opts.platformInstaller)
6969
throw new IllegalArgumentError('An instance of core/PlatformInstaller is required', opts.platformInstaller);
7070

src/commands/node/tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class NodeCommandTasks {
9999
throw new IllegalArgumentError('An instance of core/AccountManager is required', opts.accountManager as any);
100100
if (!opts || !opts.configManager) throw new Error('An instance of core/ConfigManager is required');
101101
if (!opts || !opts.logger) throw new Error('An instance of core/Logger is required');
102-
if (!opts || !opts.K0012) throw new Error('An instance of core/K0018 is required');
102+
if (!opts || !opts.k8Factory) throw new Error('An instance of core/K0018 is required');
103103
if (!opts || !opts.platformInstaller)
104104
throw new IllegalArgumentError('An instance of core/PlatformInstaller is required', opts.platformInstaller);
105105
if (!opts || !opts.keyManager)

test/unit/commands/cluster.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ describe('ClusterCommand unit tests', () => {
225225
async function runUpdateLocalConfigTask(opts) {
226226
command = new ClusterCommand(opts);
227227

228-
tasks = new ClusterCommandTasks(command, opts.K0012);
228+
tasks = new ClusterCommandTasks(command, opts.k8Factory);
229229

230230
// @ts-expect-error - TS2554: Expected 0 arguments, but got 1.
231231
const taskObj = tasks.updateLocalConfig({});
@@ -373,7 +373,7 @@ describe('ClusterCommand unit tests', () => {
373373
async function runSelectContextTask(opts) {
374374
command = new ClusterCommand(opts);
375375

376-
tasks = new ClusterCommandTasks(command, opts.K0012);
376+
tasks = new ClusterCommandTasks(command, opts.k8Factory);
377377

378378
// @ts-expect-error - TS2554: Expected 0 arguments, but got 1
379379
const taskObj = tasks.selectContext({});

test/unit/commands/network.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe('NetworkCommand unit tests', () => {
8080
container.registerInstance(InjectTokens.ClusterChecks, clusterChecksStub);
8181

8282
opts.K0014.logger = opts.logger;
83-
container.registerInstance(InjectTokens.K8Factory, opts.K0012);
83+
container.registerInstance(InjectTokens.K8Factory, opts.k8Factory);
8484

8585
opts.depManager = sinon.stub() as unknown as DependencyManager;
8686
container.registerInstance<DependencyManager>(InjectTokens.DependencyManager, opts.depManager);

0 commit comments

Comments
 (0)