Skip to content

Commit

Permalink
chore(core): cleanup the xState logs for subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
Pmejna committed Nov 4, 2024
1 parent c834993 commit f8daf3b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ const createInstallMachine = (initialContext: InstallMachineContext) => {
},
done: {
type: 'final',
entry: () => logWithColoredPrefix('stapler', 'Installation process completed!'),
},
failed: {
type: 'final',
Expand Down Expand Up @@ -455,8 +454,6 @@ export const createProject = async (options: ProjectOptions, projectDir: string)
let state: StaplerState = initializeState(projectDir, name, usePayload);
state.options = options;

const currentDir = process.cwd();

const context: InstallMachineContext = {
type: 'install',
projectDir: projectDir,
Expand All @@ -466,13 +463,5 @@ export const createProject = async (options: ProjectOptions, projectDir: string)
const installMachine = createInstallMachine(context);
const installActor = createActor(installMachine);

installActor.subscribe((state: StateFrom<typeof installMachine>) => {
if (state.matches('done')) {
logWithColoredPrefix('stapler', 'Installation process completed!');
} else if (state.matches('failed')) {
console.error('Installation process failed.');
}
});

installActor.start();
};

0 comments on commit f8daf3b

Please sign in to comment.