Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@codifycli/plugin-core",
"version": "1.2.1",
"version": "1.2.2",
"description": "TypeScript library for building Codify plugins to manage system resources (applications, CLI tools, settings) through infrastructure-as-code",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
7 changes: 4 additions & 3 deletions src/messages/sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@ class CodifyCliSenderImpl {
})
}

async sendApplyNote(message: string, resourceType?: string): Promise<void> {
sendApplyNote(message: string, resourceType?: string): void {
if (!process.send || !process.connected) {
return;
}

await this.sendAndWaitForResponse(<IpcMessageV2>{
process.send(<IpcMessageV2>{
cmd: MessageCmd.APPLY_NOTE_REQUEST,
data: <ApplyNoteRequestData>{
message,
...(resourceType && { resourceType }),
}
},
requestId: nanoid(8),
});
}

Expand Down
6 changes: 3 additions & 3 deletions src/utils/file-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class FileUtils {
);

await fs.appendFile(Utils.getPrimaryShellRc(), lineToInsert)
await CodifyCliSender.sendApplyNote(ApplyNotes.sourceShellRc());
CodifyCliSender.sendApplyNote(ApplyNotes.sourceShellRc());

function addLeadingSpacer(line: string): string {
return line.startsWith('\n')
Expand All @@ -60,7 +60,7 @@ export class FileUtils {
${lines.join('\n')}`)

await fs.appendFile(shellRc, formattedLines)
await CodifyCliSender.sendApplyNote(ApplyNotes.sourceShellRc());
CodifyCliSender.sendApplyNote(ApplyNotes.sourceShellRc());
}

/**
Expand All @@ -85,7 +85,7 @@ ${lines.join('\n')}`)
await fs.appendFile(shellRc, `\nexport PATH=${value}:$PATH;`, { encoding: 'utf8' });
}

await CodifyCliSender.sendApplyNote(ApplyNotes.sourceShellRc());
CodifyCliSender.sendApplyNote(ApplyNotes.sourceShellRc());
}

static async removeFromFile(filePath: string, search: string): Promise<void> {
Expand Down
Loading