electron-reactive-event-cli 1.0.118 → 1.0.120

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/ReadMe.md +3 -10
  2. package/package.json +7 -26
  3. package/Distribution/All.Command.d.ts +0 -2
  4. package/Distribution/All.Command.d.ts.map +0 -1
  5. package/Distribution/All.Command.js +0 -22
  6. package/Distribution/All.Command.js.map +0 -1
  7. package/Distribution/Bin.d.ts +0 -3
  8. package/Distribution/Bin.d.ts.map +0 -1
  9. package/Distribution/Bin.js +0 -86
  10. package/Distribution/Bin.js.map +0 -1
  11. package/Distribution/Command.d.ts +0 -12
  12. package/Distribution/Command.d.ts.map +0 -1
  13. package/Distribution/Command.js +0 -100
  14. package/Distribution/Command.js.map +0 -1
  15. package/Distribution/Config.Types.d.ts +0 -36
  16. package/Distribution/Config.Types.d.ts.map +0 -1
  17. package/Distribution/Config.Types.js +0 -8
  18. package/Distribution/Config.Types.js.map +0 -1
  19. package/Distribution/Config.d.ts +0 -28
  20. package/Distribution/Config.d.ts.map +0 -1
  21. package/Distribution/Config.js +0 -161
  22. package/Distribution/Config.js.map +0 -1
  23. package/Distribution/DeclareEvents.Command.d.ts +0 -2
  24. package/Distribution/DeclareEvents.Command.d.ts.map +0 -1
  25. package/Distribution/DeclareEvents.Command.js +0 -16
  26. package/Distribution/DeclareEvents.Command.js.map +0 -1
  27. package/Distribution/DeclareEvents.Types.d.ts +0 -11
  28. package/Distribution/DeclareEvents.Types.d.ts.map +0 -1
  29. package/Distribution/DeclareEvents.Types.js +0 -8
  30. package/Distribution/DeclareEvents.Types.js.map +0 -1
  31. package/Distribution/DeclareEvents.d.ts +0 -3
  32. package/Distribution/DeclareEvents.d.ts.map +0 -1
  33. package/Distribution/DeclareEvents.js +0 -213
  34. package/Distribution/DeclareEvents.js.map +0 -1
  35. package/Distribution/Docs.Command.d.ts +0 -3
  36. package/Distribution/Docs.Command.d.ts.map +0 -1
  37. package/Distribution/Docs.Command.js +0 -19
  38. package/Distribution/Docs.Command.js.map +0 -1
  39. package/Distribution/DownloadSample.Command.d.ts +0 -3
  40. package/Distribution/DownloadSample.Command.d.ts.map +0 -1
  41. package/Distribution/DownloadSample.Command.js +0 -107
  42. package/Distribution/DownloadSample.Command.js.map +0 -1
  43. package/Distribution/Generate.Command.d.ts +0 -5
  44. package/Distribution/Generate.Command.d.ts.map +0 -1
  45. package/Distribution/Generate.Command.js +0 -20
  46. package/Distribution/Generate.Command.js.map +0 -1
  47. package/Distribution/GenerateIpc.Command.d.ts +0 -3
  48. package/Distribution/GenerateIpc.Command.d.ts.map +0 -1
  49. package/Distribution/GenerateIpc.Command.js +0 -22
  50. package/Distribution/GenerateIpc.Command.js.map +0 -1
  51. package/Distribution/GenerateIpcMainModule.d.ts +0 -3
  52. package/Distribution/GenerateIpcMainModule.d.ts.map +0 -1
  53. package/Distribution/GenerateIpcMainModule.js +0 -37
  54. package/Distribution/GenerateIpcMainModule.js.map +0 -1
  55. package/Distribution/GenerateIpcRendererModule.d.ts +0 -5
  56. package/Distribution/GenerateIpcRendererModule.d.ts.map +0 -1
  57. package/Distribution/GenerateIpcRendererModule.js +0 -73
  58. package/Distribution/GenerateIpcRendererModule.js.map +0 -1
  59. package/Distribution/GenerateScopedTypes.Command.d.ts +0 -3
  60. package/Distribution/GenerateScopedTypes.Command.d.ts.map +0 -1
  61. package/Distribution/GenerateScopedTypes.Command.js +0 -44
  62. package/Distribution/GenerateScopedTypes.Command.js.map +0 -1
  63. package/Distribution/GenerateScopedTypes.Types.d.ts +0 -25
  64. package/Distribution/GenerateScopedTypes.Types.d.ts.map +0 -1
  65. package/Distribution/GenerateScopedTypes.Types.js +0 -8
  66. package/Distribution/GenerateScopedTypes.Types.js.map +0 -1
  67. package/Distribution/GenerateScopedTypes.d.ts +0 -9
  68. package/Distribution/GenerateScopedTypes.d.ts.map +0 -1
  69. package/Distribution/GenerateScopedTypes.js +0 -228
  70. package/Distribution/GenerateScopedTypes.js.map +0 -1
  71. package/Distribution/Setup.Command.d.ts +0 -3
  72. package/Distribution/Setup.Command.d.ts.map +0 -1
  73. package/Distribution/Setup.Command.js +0 -11
  74. package/Distribution/Setup.Command.js.map +0 -1
  75. package/Distribution/Setup.d.ts +0 -2
  76. package/Distribution/Setup.d.ts.map +0 -1
  77. package/Distribution/Setup.js +0 -184
  78. package/Distribution/Setup.js.map +0 -1
  79. package/Distribution/Shared.Types.d.ts +0 -6
  80. package/Distribution/Shared.Types.d.ts.map +0 -1
  81. package/Distribution/Shared.Types.js +0 -8
  82. package/Distribution/Shared.Types.js.map +0 -1
  83. package/Distribution/Shared.d.ts +0 -24
  84. package/Distribution/Shared.d.ts.map +0 -1
  85. package/Distribution/Shared.js +0 -66
  86. package/Distribution/Shared.js.map +0 -1
  87. package/Distribution/WriteTypesToClipboard.d.ts +0 -2
  88. package/Distribution/WriteTypesToClipboard.d.ts.map +0 -1
  89. package/Distribution/WriteTypesToClipboard.js +0 -193
  90. package/Distribution/WriteTypesToClipboard.js.map +0 -1
  91. package/Distribution/index.d.ts +0 -4
  92. package/Distribution/index.d.ts.map +0 -1
  93. package/Distribution/index.js +0 -25
  94. package/Distribution/index.js.map +0 -1
  95. package/License.md +0 -21
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeclareEvents.Types.d.ts","sourceRoot":"","sources":["../Source/DeclareEvents.Types.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnD,MAAM,MAAM,gBAAgB,GACxB;IACI,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,gBAAgB,CAAC;CAC3B,CAAC;AAEN,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAC5B;IACI,YAAY,EAAE,iBAAiB,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- /* File: DeclareEvents.Types.ts
3
- * Author: Gage Sorrell <gage@sorrell.sh>
4
- * Copyright: (c) 2026 Gage Sorrell
5
- * License: MIT
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- //# sourceMappingURL=DeclareEvents.Types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeclareEvents.Types.js","sourceRoot":"","sources":["../Source/DeclareEvents.Types.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -1,3 +0,0 @@
1
- export declare function GetRelativeImportPath(ImportedModuleAbsolutePath: string, ImportingModuleAbsolutePath: string): string;
2
- export declare function DeclareEvents(Path?: string): Promise<void>;
3
- //# sourceMappingURL=DeclareEvents.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeclareEvents.d.ts","sourceRoot":"","sources":["../Source/DeclareEvents.ts"],"names":[],"mappings":"AA4QA,wBAAgB,qBAAqB,CAEjC,0BAA0B,EAAE,MAAM,EAClC,2BAA2B,EAAE,MAAM,GACpC,MAAM,CAiBR;AAoDD,wBAAsB,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBhE"}
@@ -1,213 +0,0 @@
1
- "use strict";
2
- /* File: DeclareEvents.ts
3
- * Author: Gage Sorrell <gage@sorrell.sh>
4
- * Copyright: (c) 2026 Gage Sorrell
5
- * License: MIT
6
- */
7
- var __importDefault = (this && this.__importDefault) || function (mod) {
8
- return (mod && mod.__esModule) ? mod : { "default": mod };
9
- };
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.GetRelativeImportPath = GetRelativeImportPath;
12
- exports.DeclareEvents = DeclareEvents;
13
- const Config_1 = require("./Config");
14
- const Command_1 = require("./Command");
15
- const path_1 = require("path");
16
- const utilities_1 = require("@sorrell/utilities");
17
- const typescript_1 = __importDefault(require("typescript"));
18
- const promises_1 = require("fs/promises");
19
- /* eslint-disable jsdoc/require-jsdoc */
20
- function GetEventDeclarationOwner(TypeNode) {
21
- if (TypeNode === undefined || !typescript_1.default.isTypeReferenceNode(TypeNode)) {
22
- return undefined;
23
- }
24
- if (!typescript_1.default.isIdentifier(TypeNode.typeName) || TypeNode.typeName.text !== "EventDecl") {
25
- return undefined;
26
- }
27
- const TypeArguments = TypeNode.typeArguments ?? [];
28
- if (TypeArguments?.[0] !== undefined) {
29
- const Name = TypeArguments[0].getFullText();
30
- if (Name.includes("Main")) {
31
- return "Main";
32
- }
33
- else if (Name.includes("Renderer")) {
34
- return "Renderer";
35
- }
36
- else {
37
- return undefined;
38
- }
39
- }
40
- for (const TypeArgument of TypeArguments) {
41
- // console.log(JSON.stringify(TypeArgument, null, 4));
42
- if (!typescript_1.default.isLiteralTypeNode(TypeArgument)) {
43
- continue;
44
- }
45
- if (!typescript_1.default.isStringLiteral(TypeArgument.literal)) {
46
- continue;
47
- }
48
- if (TypeArgument.literal.text === "Main"
49
- || TypeArgument.literal.text === "Renderer") {
50
- return TypeArgument.literal.text;
51
- }
52
- }
53
- return undefined;
54
- }
55
- function CreateFormatDiagnosticsHost() {
56
- return {
57
- getCanonicalFileName(FilePath) {
58
- return FilePath;
59
- },
60
- getCurrentDirectory() {
61
- return process.cwd();
62
- },
63
- getNewLine() {
64
- return typescript_1.default.sys.newLine;
65
- }
66
- };
67
- }
68
- function IsPathWithinDirectory(CandidatePath, DirectoryPath) {
69
- const NormalizedCandidatePath = (0, path_1.resolve)(CandidatePath);
70
- const NormalizedDirectoryPath = (0, path_1.resolve)(DirectoryPath);
71
- if (process.platform === "win32") {
72
- const LowerCandidatePath = NormalizedCandidatePath.toLowerCase();
73
- const LowerDirectoryPath = NormalizedDirectoryPath.toLowerCase();
74
- return LowerCandidatePath === LowerDirectoryPath
75
- || LowerCandidatePath.startsWith(LowerDirectoryPath + path_1.sep);
76
- }
77
- return NormalizedCandidatePath === NormalizedDirectoryPath
78
- || NormalizedCandidatePath.startsWith(NormalizedDirectoryPath + path_1.sep);
79
- }
80
- function IsSymbolExportedFromSourceFile(TypeChecker, SourceFile, SymbolToCheck) {
81
- if (SymbolToCheck === undefined) {
82
- return false;
83
- }
84
- const ModuleSymbol = TypeChecker.getSymbolAtLocation(SourceFile);
85
- if (ModuleSymbol === undefined) {
86
- return false;
87
- }
88
- const ExportSymbols = TypeChecker.getExportsOfModule(ModuleSymbol);
89
- for (const ExportSymbol of ExportSymbols) {
90
- const ResolvedExportSymbol = (ExportSymbol.flags & typescript_1.default.SymbolFlags.Alias) !== 0
91
- ? TypeChecker.getAliasedSymbol(ExportSymbol)
92
- : ExportSymbol;
93
- if (ResolvedExportSymbol === SymbolToCheck) {
94
- return true;
95
- }
96
- }
97
- return false;
98
- }
99
- async function FindExportedEventDeclTypes() {
100
- const PackageRootDirectoryPathResolved = await (0, utilities_1.GetPackageRootDirectory)();
101
- const TsConfigFilePath = (0, path_1.resolve)(PackageRootDirectoryPathResolved, "tsconfig.json");
102
- const ConfigFileResult = typescript_1.default.readConfigFile(TsConfigFilePath, typescript_1.default.sys.readFile);
103
- if (ConfigFileResult.error !== undefined) {
104
- throw new Error(typescript_1.default.formatDiagnosticsWithColorAndContext([ConfigFileResult.error], CreateFormatDiagnosticsHost()));
105
- }
106
- const ParsedCommandLine = typescript_1.default.parseJsonConfigFileContent(ConfigFileResult.config, typescript_1.default.sys, PackageRootDirectoryPathResolved, undefined, TsConfigFilePath);
107
- if (ParsedCommandLine.errors.length > 0) {
108
- throw new Error(typescript_1.default.formatDiagnosticsWithColorAndContext(ParsedCommandLine.errors, CreateFormatDiagnosticsHost()));
109
- }
110
- const Program = typescript_1.default.createProgram({
111
- options: ParsedCommandLine.options,
112
- projectReferences: ParsedCommandLine.projectReferences || [],
113
- rootNames: ParsedCommandLine.fileNames
114
- });
115
- const TypeChecker = Program.getTypeChecker();
116
- const MatchesByPath = new Map();
117
- for (const SourceFile of Program.getSourceFiles()) {
118
- if (SourceFile.isDeclarationFile) {
119
- continue;
120
- }
121
- if (!IsPathWithinDirectory(SourceFile.fileName, PackageRootDirectoryPathResolved)) {
122
- continue;
123
- }
124
- for (const Statement of SourceFile.statements) {
125
- if (!typescript_1.default.isTypeAliasDeclaration(Statement)) {
126
- continue;
127
- }
128
- const Owner = GetEventDeclarationOwner(Statement.type);
129
- if (Owner === undefined) {
130
- continue;
131
- }
132
- const DeclarationSymbol = TypeChecker.getSymbolAtLocation(Statement.name);
133
- if (!IsSymbolExportedFromSourceFile(TypeChecker, SourceFile, DeclarationSymbol)) {
134
- continue;
135
- }
136
- const ExistingMatch = MatchesByPath.get(SourceFile.fileName);
137
- if (ExistingMatch === undefined) {
138
- MatchesByPath.set(SourceFile.fileName, {
139
- Declarations: [
140
- {
141
- Name: Statement.name.text,
142
- Owner
143
- }
144
- ],
145
- Path: SourceFile.fileName
146
- });
147
- }
148
- else {
149
- ExistingMatch.Declarations.push({
150
- Name: Statement.name.text,
151
- Owner
152
- });
153
- }
154
- }
155
- }
156
- return [...MatchesByPath.values()];
157
- }
158
- function GetRelativeImportPath(ImportedModuleAbsolutePath, ImportingModuleAbsolutePath) {
159
- const ImportingDirectory = (0, path_1.dirname)(ImportingModuleAbsolutePath);
160
- let RelativeImportPath = (0, path_1.relative)(ImportingDirectory, ImportedModuleAbsolutePath);
161
- RelativeImportPath = RelativeImportPath.replaceAll("\\", "/");
162
- if (!RelativeImportPath.startsWith(".")) {
163
- RelativeImportPath = `./${RelativeImportPath}`;
164
- }
165
- return RelativeImportPath;
166
- }
167
- function DeclareEventsInner(Config) {
168
- return async function () {
169
- const FileName = (0, path_1.basename)(Config.AugmentationModulePath);
170
- const Header = (0, Command_1.GetHeader)(FileName, "declare-events");
171
- const EventDeclarations = await FindExportedEventDeclTypes();
172
- const ImportStatements = EventDeclarations.map(({ Declarations, Path }) => {
173
- const Names = Declarations.map(({ Name }) => Name);
174
- const RelativePath = GetRelativeImportPath(Path, Config.AugmentationModulePath);
175
- return `import type { ${Names.join(", ")} } from "${RelativePath}";`;
176
- }).join("\n");
177
- const Entries = EventDeclarations.flatMap(({ Declarations }) => {
178
- return Declarations.map(({ Name }) => {
179
- return " ".repeat(12) + `${Name}: ${Name};`;
180
- });
181
- }).join("\n");
182
- const Contents = Header +
183
- "\n" +
184
- ImportStatements +
185
- `\n\ndeclare module "electron-reactive-event/registrar"
186
- {
187
- interface Registrar
188
- {
189
- ${Config.PackageKey}:
190
- {
191
- ${Entries}
192
- };
193
- }
194
- };\n`;
195
- await (0, promises_1.writeFile)(Config.AugmentationModulePath, Contents, { encoding: "utf-8" });
196
- return EventDeclarations.length.toString();
197
- };
198
- }
199
- async function DeclareEvents(Path) {
200
- const Config = await (0, Config_1.GetConfigSafe)(Path);
201
- const DefaultConfig = await (0, Config_1.GetDefaultConfig)(Path);
202
- const DefaultLabelAugmentationPath = Config.AugmentationModulePath === DefaultConfig.AugmentationModulePath
203
- ? "default"
204
- : "";
205
- if (!(await (0, Config_1.HasConfig)(Path))) {
206
- /* eslint-disable-next-line @stylistic/max-len */
207
- console.log("\n💡 Tip: You can create a default config file by running\n\n npm exec electron-reactive-event setup\n");
208
- }
209
- await (0, Command_1.Try)(
210
- /* eslint-disable-next-line @stylistic/max-len */
211
- `Writing augmentation module at ${DefaultLabelAugmentationPath} path ${Config.AugmentationModulePath}...`, (Result) => `Successfully augmented the registrar with ${Result} event declarations!`, DeclareEventsInner(Config));
212
- }
213
- //# sourceMappingURL=DeclareEvents.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeclareEvents.js","sourceRoot":"","sources":["../Source/DeclareEvents.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAwQH,sDAqBC;AAoDD,sCAsBC;AAlWD,qCAAsE;AACtE,uCAA2C;AAC3C,+BAAiE;AAEjE,kDAA6D;AAC7D,4DAAoC;AACpC,0CAAwC;AAExC,wCAAwC;AAExC,SAAS,wBAAwB,CAC7B,QAAyC;IAGzC,IAAI,QAAQ,KAAK,SAAS,IAAI,CAAC,oBAAU,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EACvE,CA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AmC,4BAA6B,SAAU,MAAM,CAAC,sBAAuB,KAAK,EAC7G,CAAC,MAAc,EAAE,EAAE,CAAC,6CAA8C,MAAO,sBAAsB,EAC/F,kBAAkB,CAAC,MAAM,CAAC,CAC7B,CAAC;AACN,CAAC"}
@@ -1,3 +0,0 @@
1
- /** Opens the documentation page for the CLI. */
2
- export declare function DocsCommand(): Promise<void>;
3
- //# sourceMappingURL=Docs.Command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Docs.Command.d.ts","sourceRoot":"","sources":["../Source/Docs.Command.ts"],"names":[],"mappings":"AASA,gDAAgD;AAChD,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAIjD"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- /* File: Docs.Command.ts
3
- * Author: Gage Sorrell <gage@sorrell.sh>
4
- * Copyright: (c) 2026 Gage Sorrell
5
- * License: MIT
6
- */
7
- var __importDefault = (this && this.__importDefault) || function (mod) {
8
- return (mod && mod.__esModule) ? mod : { "default": mod };
9
- };
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.DocsCommand = DocsCommand;
12
- const Command_1 = require("./Command");
13
- const open_1 = __importDefault(require("open"));
14
- /** Opens the documentation page for the CLI. */
15
- async function DocsCommand() {
16
- (0, Command_1.SetCommand)("docs");
17
- (0, open_1.default)("https://electron-reactive-event.sorrell.sh/1.0.0/cli/introduction");
18
- }
19
- //# sourceMappingURL=Docs.Command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Docs.Command.js","sourceRoot":"","sources":["../Source/Docs.Command.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAMH,kCAIC;AARD,uCAAuC;AACvC,gDAAwB;AAExB,gDAAgD;AACzC,KAAK,UAAU,WAAW;IAE7B,IAAA,oBAAU,EAAC,MAAM,CAAC,CAAC;IACnB,IAAA,cAAI,EAAC,mEAAmE,CAAC,CAAC;AAC9E,CAAC"}
@@ -1,3 +0,0 @@
1
- /** Downloads the sample project for this package. */
2
- export declare function DownloadSampleCommand(): Promise<void>;
3
- //# sourceMappingURL=DownloadSample.Command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DownloadSample.Command.d.ts","sourceRoot":"","sources":["../Source/DownloadSample.Command.ts"],"names":[],"mappings":"AAgBA,qDAAqD;AACrD,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAqI3D"}
@@ -1,107 +0,0 @@
1
- "use strict";
2
- /* File: DownloadSample.Command.ts
3
- * Author: Gage Sorrell <gage@sorrell.sh>
4
- * Copyright: (c) 2026 Gage Sorrell
5
- * License: MIT
6
- */
7
- var __importDefault = (this && this.__importDefault) || function (mod) {
8
- return (mod && mod.__esModule) ? mod : { "default": mod };
9
- };
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.DownloadSampleCommand = DownloadSampleCommand;
12
- const cli_utilities_1 = require("@sorrell/cli-utilities");
13
- const listr2_1 = require("listr2");
14
- const simple_git_1 = require("simple-git");
15
- const chalk_1 = __importDefault(require("chalk"));
16
- const fs_1 = require("fs");
17
- const Shared_1 = require("./Shared");
18
- const promises_1 = require("fs/promises");
19
- const path_1 = require("path");
20
- const os_1 = require("os");
21
- /** Downloads the sample project for this package. */
22
- async function DownloadSampleCommand() {
23
- const Context = {
24
- DownloadPath: "",
25
- Git: undefined,
26
- TempPath: ""
27
- };
28
- let DownloadPath = "";
29
- try {
30
- await new listr2_1.Listr([
31
- {
32
- task: async (Context, Task) => {
33
- const SampleDirectoryName = "electron-reactive-event-sample";
34
- Context.DownloadPath = "./" + SampleDirectoryName;
35
- DownloadPath = Context.DownloadPath;
36
- Task.title = `Creating directory ${(0, cli_utilities_1.Path)(Context.DownloadPath)}.`;
37
- await fs_1.promises.mkdir(Context.DownloadPath);
38
- Task.title = `Created directory ${(0, cli_utilities_1.Path)(Context.DownloadPath)}.`;
39
- },
40
- title: "Creating directory "
41
- },
42
- {
43
- task: async (Context, Task) => {
44
- Context.TempPath = (0, path_1.resolve)((0, os_1.tmpdir)(), "electron-reactive-event-cli");
45
- await (0, promises_1.mkdir)(Context.TempPath);
46
- Task.title = "Created temp directory to download and process the sample project.";
47
- },
48
- title: "Creating temp directory to download and process the sample project."
49
- },
50
- {
51
- task: async (Context, Task) => {
52
- Context.Git = (0, simple_git_1.simpleGit)();
53
- Task.title = `Initialized ${(0, cli_utilities_1.Code)("git")} client.`;
54
- },
55
- title: `Initializing ${(0, cli_utilities_1.Code)("git")} client.`
56
- },
57
- {
58
- task: async (Context, Task) => {
59
- if (Context.Git === undefined) {
60
- throw new Shared_1.SimpleError("Git client was not initialized.");
61
- }
62
- await Context.Git.raw("clone", "--filter=blob:none", "--sparse", "https://github.com/GageSorrell/SorrellWm.git", Context.TempPath);
63
- /* eslint-disable-next-line @stylistic/max-len */
64
- Task.title = `Performed sparse ${(0, cli_utilities_1.Code)("clone")} of the monorepo containing the sample project.`;
65
- },
66
- title: `Performing sparse ${(0, cli_utilities_1.Code)("clone")} of the monorepo containing the sample project.`
67
- },
68
- {
69
- task: async (Context, Task) => {
70
- if (Context.Git === undefined) {
71
- throw new Shared_1.SimpleError("Git client was not initialized.");
72
- }
73
- await Context.Git.cwd({
74
- path: (0, path_1.resolve)(Context.TempPath),
75
- root: true
76
- });
77
- await Context.Git.raw("sparse-checkout", "set", (0, path_1.resolve)(Context.DownloadPath));
78
- Task.title = `Performed ${(0, cli_utilities_1.Code)("sparse checkout")} of the sample project.`;
79
- },
80
- title: `Performing ${(0, cli_utilities_1.Code)("sparse checkout")} of the sample project.`
81
- },
82
- {
83
- task: async (Context, Task) => {
84
- await fs_1.promises.rm(Context.TempPath, { force: true, recursive: true });
85
- Task.title = "Deleted temp directory.";
86
- },
87
- title: "Deleting temp directory."
88
- }
89
- ], {
90
- renderer: listr2_1.DefaultRenderer
91
- }).run();
92
- }
93
- catch (ListrError) {
94
- if (ListrError instanceof Shared_1.SimpleError) {
95
- console.error(`🚨 ${ListrError.TheMessage}`);
96
- process.exit(1);
97
- }
98
- else {
99
- console.dir(ListrError);
100
- console.error("\n🚨 Failed to download the sample project. The error is printed above.");
101
- process.exit(1);
102
- }
103
- }
104
- console.log(`${chalk_1.default.green("✓")} Downloaded sample project to ${(0, cli_utilities_1.Path)(DownloadPath)}.`);
105
- process.exit(0);
106
- }
107
- //# sourceMappingURL=DownloadSample.Command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DownloadSample.Command.js","sourceRoot":"","sources":["../Source/DownloadSample.Command.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAaH,sDAqIC;AAhJD,0DAAoD;AACpD,mCAAkG;AAClG,2CAAuD;AACvD,kDAA0B;AAC1B,2BAAoC;AACpC,qCAAuC;AACvC,0CAAoC;AACpC,+BAA+B;AAC/B,2BAA4B;AAE5B,qDAAqD;AAC9C,KAAK,UAAU,qBAAqB;IAWvC,MAAM,OAAO,GACT;QACI,YAAY,EAAE,EAAE;QAChB,GAAG,EAAE,SAAS;QACd,QAAQ,EAAE,EAAE;KACf,CAAC;IAEN,IAAI,YAAY,GAAW,EAAE,CAAC;IAE9B,IACA,CAAC;QACG,MAAM,IAAI,cAAK,CAAsD;YACjE;gBACI,IAAI,EAAE,KAAK,EAAE,OAAgB,EAAE,IAAa,EAAiB,EAAE;oBAE3D,MAAM,mBAAmB,GAAW,gCAAgC,CAAC;oBACrE,OAAO,CAAC,YAAY,GAAG,IAAI,GAAG,mBAAmB,CAAC;oBAElD,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;oBAEpC,IAAI,CAAC,KAAK,GAAG,sBAAuB,IAAA,oBAAI,EAAC,OAAO,CAAC,YAAY,CAAE,GAAG,CAAC;oBAEnE,MAAM,aAAE,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;oBAErC,IAAI,CAAC,KAAK,GAAG,qBAAsB,IAAA,oBAAI,EAAC,OAAO,CAAC,YAAY,CAAE,GAAG,CAAC;gBACtE,CAAC;gBACD,KAAK,EAAE,qBA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CAAC;YAC1F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;IACL,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,GAAI,eAAK,CAAC,KAAK,CAAC,GAAG,CAAE,iCAAkC,IAAA,oBAAI,EAAC,YAAY,CAAE,GAAG,CAAC,CAAC;IAC3F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Runs all `generate-*` commands.
3
- */
4
- export declare function GenerateCommand(): Promise<void>;
5
- //# sourceMappingURL=Generate.Command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Generate.Command.d.ts","sourceRoot":"","sources":["../Source/Generate.Command.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAKrD"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- /* File: Generate.Command.ts
3
- * Author: Gage Sorrell <gage@sorrell.sh>
4
- * Copyright: (c) 2026 Gage Sorrell
5
- * License: MIT
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.GenerateCommand = GenerateCommand;
9
- const GenerateIpc_Command_1 = require("./GenerateIpc.Command");
10
- const GenerateScopedTypes_Command_1 = require("./GenerateScopedTypes.Command");
11
- const Command_1 = require("./Command");
12
- /**
13
- * Runs all `generate-*` commands.
14
- */
15
- async function GenerateCommand() {
16
- (0, Command_1.SetCommand)("generate");
17
- await (0, GenerateIpc_Command_1.GenerateIpc)();
18
- await (0, GenerateScopedTypes_Command_1.GenerateScopedTypes)();
19
- }
20
- //# sourceMappingURL=Generate.Command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Generate.Command.js","sourceRoot":"","sources":["../Source/Generate.Command.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AASH,0CAKC;AAZD,+DAAoD;AACpD,+EAAoE;AACpE,uCAAuC;AAEvC;;GAEG;AACI,KAAK,UAAU,eAAe;IAEjC,IAAA,oBAAU,EAAC,UAAU,CAAC,CAAC;IACvB,MAAM,IAAA,iCAAW,GAAE,CAAC;IACpB,MAAM,IAAA,iDAAmB,GAAE,CAAC;AAChC,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare function GenerateIpcCommand(): Promise<void>;
2
- export declare function GenerateIpc(): Promise<void>;
3
- //# sourceMappingURL=GenerateIpc.Command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenerateIpc.Command.d.ts","sourceRoot":"","sources":["../Source/GenerateIpc.Command.ts"],"names":[],"mappings":"AAYA,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAKxD;AAED,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAIjD"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- /* File: GenerateIpc.Command.ts
3
- * Author: Gage Sorrell <gage@sorrell.sh>
4
- * Copyright: (c) 2026 Gage Sorrell
5
- * License: MIT
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.GenerateIpcCommand = GenerateIpcCommand;
9
- exports.GenerateIpc = GenerateIpc;
10
- /* eslint-disable jsdoc/require-jsdoc */
11
- const GenerateIpcMainModule_1 = require("./GenerateIpcMainModule");
12
- const GenerateIpcRendererModule_1 = require("./GenerateIpcRendererModule");
13
- const Command_1 = require("./Command");
14
- async function GenerateIpcCommand() {
15
- (0, Command_1.SetCommand)("generate-ipc");
16
- await GenerateIpc();
17
- }
18
- async function GenerateIpc() {
19
- await (0, GenerateIpcMainModule_1.GenerateIpcMainModule)();
20
- await (0, GenerateIpcRendererModule_1.GenerateIpcRendererModule)();
21
- }
22
- //# sourceMappingURL=GenerateIpc.Command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenerateIpc.Command.js","sourceRoot":"","sources":["../Source/GenerateIpc.Command.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAQH,gDAKC;AAED,kCAIC;AAjBD,wCAAwC;AAExC,mEAAgE;AAChE,2EAAwE;AACxE,uCAAuC;AAEhC,KAAK,UAAU,kBAAkB;IAEpC,IAAA,oBAAU,EAAC,cAAc,CAAC,CAAC;IAE3B,MAAM,WAAW,EAAE,CAAC;AACxB,CAAC;AAEM,KAAK,UAAU,WAAW;IAE7B,MAAM,IAAA,6CAAqB,GAAE,CAAC;IAC9B,MAAM,IAAA,qDAAyB,GAAE,CAAC;AACtC,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare function GenerateIpcMainModule(): Promise<void>;
2
- export declare function GenerateIpcMainModuleCommand(): Promise<void>;
3
- //# sourceMappingURL=GenerateIpcMainModule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenerateIpcMainModule.d.ts","sourceRoot":"","sources":["../Source/GenerateIpcMainModule.ts"],"names":[],"mappings":"AAiCA,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAc3D;AAED,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,IAAI,CAAC,CAIlE"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- /* File: GenerateIpcMainModule.ts
3
- * Author: Gage Sorrell <gage@sorrell.sh>
4
- * Copyright: (c) 2026 Gage Sorrell
5
- * License: MIT
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.GenerateIpcMainModule = GenerateIpcMainModule;
9
- exports.GenerateIpcMainModuleCommand = GenerateIpcMainModuleCommand;
10
- /* eslint-disable jsdoc/require-jsdoc */
11
- const Command_1 = require("./Command");
12
- const Config_1 = require("./Config");
13
- const GenerateIpcRendererModule_1 = require("./GenerateIpcRendererModule");
14
- const DeclareEvents_1 = require("./DeclareEvents");
15
- const promises_1 = require("fs/promises");
16
- function Inner(Config, ModulePath) {
17
- return async function () {
18
- const Header = (0, Command_1.GetHeader)(ModulePath, "declare-events");
19
- const ImportPath = (0, DeclareEvents_1.GetRelativeImportPath)(Config.ScopedModulePath, ModulePath);
20
- const Contents = Header + `import type { PackageKey } from "${ImportPath}";
21
- import { type IpcMainReactive, getReactiveIpcMain } from "electron-reactive-event/scoped";
22
-
23
- export const ipcMain: IpcMainReactive<PackageKey> = getReactiveIpcMain<PackageKey>();
24
- `;
25
- await (0, promises_1.writeFile)(ModulePath, Contents, { encoding: "utf-8" });
26
- };
27
- }
28
- async function GenerateIpcMainModule() {
29
- const Config = await (0, Config_1.GetConfigSafe)();
30
- const ModulePath = await (0, Command_1.Try)("Loading the IpcModulePath.Main path from the config file...", "Found the IpcModulePath.Main in your package's root directory!", (0, GenerateIpcRendererModule_1.GetIpcPath)(Config, "Main"));
31
- await (0, Command_1.Try)("Writing the file...", `Wrote the hooks successfully to ${ModulePath}!`, Inner(Config, ModulePath));
32
- }
33
- async function GenerateIpcMainModuleCommand() {
34
- (0, Command_1.SetCommand)("generate-ipc main");
35
- await GenerateIpcMainModule();
36
- }
37
- //# sourceMappingURL=GenerateIpcMainModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenerateIpcMainModule.js","sourceRoot":"","sources":["../Source/GenerateIpcMainModule.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA6BH,sDAcC;AAED,oEAIC;AA/CD,wCAAwC;AAExC,uCAAuD;AAEvD,qCAAyC;AACzC,2EAAyD;AACzD,mDAAwD;AACxD,0CAAwC;AAExC,SAAS,KAAK,CACV,MAAiB,EACjB,UAAkB;IAGlB,OAAO,KAAK;QAER,MAAM,MAAM,GAAW,IAAA,mBAAS,EAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAC/D,MAAM,UAAU,GAAW,IAAA,qCAAqB,EAAC,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;QACtF,MAAM,QAAQ,GAAW,MAAM,GAAG,oCAAqC,UAAW;;;;CAIzF,CAAC;QACM,MAAM,IAAA,oBAAS,EAAC,UAAU,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC,CAAC;AACN,CAAC;AAEM,KAAK,UAAU,qBAAqB;IAEvC,MAAM,MAAM,GAAc,MAAM,IAAA,sBAAa,GAAE,CAAC;IAChD,MAAM,UAAU,GAAW,MAAM,IAAA,aAAG,EAChC,6DAA6D,EAC7D,gEAAgE,EAChE,IAAA,sCAAU,EAAC,MAAM,EAAE,MAAM,CAAC,CAC7B,CAAC;IAEF,MAAM,IAAA,aAAG,EACL,qBAAqB,EACrB,mCAAoC,UAAW,GAAG,EAClD,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAC5B,CAAC;AACN,CAAC;AAEM,KAAK,UAAU,4BAA4B;IAE9C,IAAA,oBAAU,EAAC,mBAAmB,CAAC,CAAC;IAChC,MAAM,qBAAqB,EAAE,CAAC;AAClC,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { CliConfig } from "./Config.Types";
2
- export declare function GetIpcPath(Config: CliConfig, Owner: "Main" | "Renderer"): (() => Promise<string>);
3
- export declare function GenerateIpcRendererModule(): Promise<void>;
4
- export declare function GenerateIpcRendererModuleCommand(): Promise<void>;
5
- //# sourceMappingURL=GenerateIpcRendererModule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenerateIpcRendererModule.d.ts","sourceRoot":"","sources":["../Source/GenerateIpcRendererModule.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAKhD,wBAAgB,UAAU,CACtB,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,GAAG,UAAU,GAC3B,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,CAqBzB;AAwCD,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAc/D;AAED,wBAAsB,gCAAgC,IAAI,OAAO,CAAC,IAAI,CAAC,CAItE"}
@@ -1,73 +0,0 @@
1
- "use strict";
2
- /* File: GenerateIpcRenderer.Command.ts
3
- * Author: Gage Sorrell <gage@sorrell.sh>
4
- * Copyright: (c) 2026 Gage Sorrell
5
- * License: MIT
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.GetIpcPath = GetIpcPath;
9
- exports.GenerateIpcRendererModule = GenerateIpcRendererModule;
10
- exports.GenerateIpcRendererModuleCommand = GenerateIpcRendererModuleCommand;
11
- /* eslint-disable jsdoc/require-jsdoc */
12
- const Command_1 = require("./Command");
13
- const Config_1 = require("./Config");
14
- const DeclareEvents_1 = require("./DeclareEvents");
15
- const promises_1 = require("node:fs/promises");
16
- function GetIpcPath(Config, Owner) {
17
- return async function () {
18
- if ("IpcModulePath" in Config && Config.IpcModulePath !== undefined) {
19
- if (Owner in Config.IpcModulePath && Config.IpcModulePath[Owner] !== undefined) {
20
- return Config.IpcModulePath[Owner];
21
- }
22
- else {
23
- /* eslint-disable-next-line @stylistic/max-len */
24
- throw new Command_1.TryError(`The ${Owner} property of IpcModulePath was not found in the config file.`);
25
- }
26
- }
27
- else {
28
- throw new Command_1.TryError("The IpcModulePath property was not found in the config file.");
29
- }
30
- };
31
- }
32
- function Inner(Config, ModulePath) {
33
- return async function () {
34
- const Header = (0, Command_1.GetHeader)(ModulePath, "declare-events");
35
- const ImportPath = (0, DeclareEvents_1.GetRelativeImportPath)(Config.ScopedModulePath, ModulePath);
36
- const Contents = Header + `import type { PackageKey } from "${ImportPath}";
37
- import { getReactiveIpcHooks } from "electron-reactive-event/scoped";
38
-
39
- const {
40
- useInvokeEvent: UseInvokeEvent,
41
- useInvokeEventDeferred: UseInvokeEventDeferred,
42
- useOnEvent: UseOnEvent,
43
- useOnEventDeferred: UseOnEventDeferred,
44
- useOnceEvent: UseOnceEvent,
45
- useOnceEventDeferred: UseOnceEventDeferred,
46
- useOffEventDeferred: UseOffEventDeferred,
47
- useSendEvent: UseSendEvent,
48
- useSendEventDeferred: UseSendEventDeferred
49
- } = getReactiveIpcHooks<PackageKey>();
50
-
51
- export const useInvokeEvent: typeof UseInvokeEvent = UseInvokeEvent;
52
- export const useInvokeEventDeferred: typeof UseInvokeEventDeferred = UseInvokeEventDeferred;
53
- export const useOnEvent: typeof UseOnEvent = UseOnEvent;
54
- export const useOnEventDeferred: typeof UseOnEventDeferred = UseOnEventDeferred;
55
- export const useOnceEvent: typeof UseOnceEvent = UseOnceEvent;
56
- export const useOnceEventDeferred: typeof UseOnceEventDeferred = UseOnceEventDeferred;
57
- export const useOffEventDeferred: typeof UseOffEventDeferred = UseOffEventDeferred;
58
- export const useSendEvent: typeof UseSendEvent = UseSendEvent;
59
- export const useSendEventDeferred: typeof UseSendEventDeferred = UseSendEventDeferred;
60
- `;
61
- await (0, promises_1.writeFile)(ModulePath, Contents, { encoding: "utf-8" });
62
- };
63
- }
64
- async function GenerateIpcRendererModule() {
65
- const Config = await (0, Config_1.GetConfigSafe)();
66
- const ModulePath = await (0, Command_1.Try)("Loading the IpcModulePath.Renderer path from the config file...", "Found the IpcModulePath.Renderer in your package's root directory!", GetIpcPath(Config, "Renderer"));
67
- await (0, Command_1.Try)("Writing the file...", `Wrote the hooks successfully to ${ModulePath}!`, Inner(Config, ModulePath));
68
- }
69
- async function GenerateIpcRendererModuleCommand() {
70
- (0, Command_1.SetCommand)("generate-ipc renderer");
71
- await GenerateIpcRendererModule();
72
- }
73
- //# sourceMappingURL=GenerateIpcRendererModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenerateIpcRendererModule.js","sourceRoot":"","sources":["../Source/GenerateIpcRendererModule.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAUH,gCAwBC;AAwCD,8DAcC;AAED,4EAIC;AA5FD,wCAAwC;AAExC,uCAAiE;AAEjE,qCAAyC;AACzC,mDAAwD;AACxD,+CAA6C;AAE7C,SAAgB,UAAU,CACtB,MAAiB,EACjB,KAA0B;IAG1B,OAAO,KAAK;QAER,IAAI,eAAe,IAAI,MAAM,IAAI,MAAM,CAAC,aAAa,KAAK,SAAS,EACnE,CAAC;YACG,IAAI,KAAK,IAAI,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,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AAC"}
@@ -1,3 +0,0 @@
1
- export declare function GenerateScopedTypesCommand(): Promise<void>;
2
- export declare function GenerateScopedTypes(): Promise<void>;
3
- //# sourceMappingURL=GenerateScopedTypes.Command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenerateScopedTypes.Command.d.ts","sourceRoot":"","sources":["../Source/GenerateScopedTypes.Command.ts"],"names":[],"mappings":"AAaA,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAIhE;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAoCzD"}