electron-reactive-event-cli 1.0.63 → 1.0.64

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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=Bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bin.d.ts","sourceRoot":"","sources":["../Source/Bin.ts"],"names":[],"mappings":""}
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ /* File: Bin.ts
4
+ * Author: Gage Sorrell <gage@sorrell.sh>
5
+ * Copyright: (c) 2026 Gage Sorrell
6
+ * License: MIT
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ /* eslint-disable jsdoc/require-jsdoc, no-console */
10
+ const DeclareEvents_Command_1 = require("./DeclareEvents.Command");
11
+ const GenerateScopedTypes_Command_1 = require("./GenerateScopedTypes.Command");
12
+ const utilities_1 = require("@sorrell/utilities");
13
+ const Setup_1 = require("./Setup");
14
+ const promises_1 = require("fs/promises");
15
+ const path_1 = require("path");
16
+ async function ShowHelp() {
17
+ const Root = await (0, utilities_1.GetPackageRootDirectory)();
18
+ const PackageJson = JSON.parse(await (0, promises_1.readFile)((0, path_1.resolve)(Root, "package.json"), { encoding: "utf-8" }));
19
+ const Version = PackageJson.version;
20
+ /* eslint-disable @stylistic/max-len */
21
+ console.log(`electron-reactive-event-cli v${Version}.\nCopyright 2026 Gage Sorrell.\nReleased under the MIT license.\n
22
+ Commands:
23
+
24
+ declare-events: Generates a module that augments the Registrar with your event declarations.
25
+ generate-scoped-types: Generates copies of the types exported by electron-reactive-event/scoped, but scoped to your PackageKey.
26
+ generate-types: Alias for generate-scoped-types.
27
+ set-up: Creates a config file. This is necessary for using the CLI.
28
+ setup: Alias for set-up.
29
+ `);
30
+ /* eslint-enable @stylistic/max-len */
31
+ }
32
+ async function Main() {
33
+ const Commands = {
34
+ "declare-events": DeclareEvents_Command_1.DeclareEventsCommand,
35
+ "generate-scoped-types": GenerateScopedTypes_Command_1.GenerateScopedTypesCommand,
36
+ "generate-types": GenerateScopedTypes_Command_1.GenerateScopedTypesCommand,
37
+ "set-up": Setup_1.SetupCommand,
38
+ setup: Setup_1.SetupCommand
39
+ };
40
+ const Command = process.argv[process.argv.length - 1];
41
+ if (Command in Commands && Commands[Command] !== undefined) {
42
+ await Commands[Command]();
43
+ }
44
+ else {
45
+ await ShowHelp();
46
+ }
47
+ }
48
+ Main();
49
+ //# sourceMappingURL=Bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bin.js","sourceRoot":"","sources":["../Source/Bin.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;;AAEH,oDAAoD;AAEpD,mEAA+D;AAC/D,+EAA2E;AAC3E,kDAA6D;AAC7D,mCAAuC;AACvC,0CAAuC;AACvC,+BAA+B;AAE/B,KAAK,UAAU,QAAQ;IAGnB,MAAM,IAAI,GAAW,MAAM,IAAA,mCAAuB,GAAE,CAAC;IACrD,MAAM,WAAW,GACb,IAAI,CAAC,KAAK,CAAC,MAAM,IAAA,mBAAQ,EAAC,IAAA,cAAO,EAAC,IAAI,EAAE,cAAc,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAgB,CAAC;IAEpG,MAAM,OAAO,GAAW,WAAW,CAAC,OAAO,CAAC;IAC5C,uCAAuC;IACvC,OAAO,CAAC,GAAG,CAAC,gCAAiC,OAAQ;;;;;;;;CAQxD,CAAC,CAAC;IACC,sCAAsC;AAC1C,CAAC;AAED,KAAK,UAAU,IAAI;IAGf,MAAM,QAAQ,GACV;QACI,gBAAgB,EAAE,4CAAoB;QACtC,uBAAuB,EAAE,wDAA0B;QACnD,gBAAgB,EAAE,wDAA0B;QAC5C,QAAQ,EAAE,oBAAY;QACtB,KAAK,EAAE,oBAAY;KACb,CAAC;IAEf,MAAM,OAAO,GAAW,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAW,CAAC;IAExE,IAAI,OAAO,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,SAAS,EAC1D,CAAC;QACG,MAAM,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9B,CAAC;SAED,CAAC;QACG,MAAM,QAAQ,EAAE,CAAC;IACrB,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export declare function DeclareEventsCommand(): Promise<void>;
2
2
  //# sourceMappingURL=DeclareEvents.Command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeclareEvents.Command.d.ts","sourceRoot":"","sources":["../Source/DeclareEvents.Command.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"DeclareEvents.Command.d.ts","sourceRoot":"","sources":["../Source/DeclareEvents.Command.ts"],"names":[],"mappings":"AAWA,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAI1D"}
@@ -5,12 +5,12 @@
5
5
  * License: MIT
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.DeclareEventsCommand = DeclareEventsCommand;
8
9
  /* eslint-disable jsdoc/require-jsdoc */
9
10
  const DeclareEvents_1 = require("./DeclareEvents");
10
11
  const Command_1 = require("./Command");
11
- async function Main() {
12
+ async function DeclareEventsCommand() {
12
13
  (0, Command_1.SetCommand)("declare-events");
13
14
  await (0, DeclareEvents_1.DeclareEvents)();
14
15
  }
15
- Main();
16
16
  //# sourceMappingURL=DeclareEvents.Command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeclareEvents.Command.js","sourceRoot":"","sources":["../Source/DeclareEvents.Command.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAEH,wCAAwC;AAExC,mDAAgD;AAChD,uCAAuC;AAEvC,KAAK,UAAU,IAAI;IAEf,IAAA,oBAAU,EAAC,gBAAgB,CAAC,CAAC;IAC7B,MAAM,IAAA,6BAAa,GAAE,CAAC;AAC1B,CAAC;AAED,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"DeclareEvents.Command.js","sourceRoot":"","sources":["../Source/DeclareEvents.Command.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAOH,oDAIC;AATD,wCAAwC;AAExC,mDAAgD;AAChD,uCAAuC;AAEhC,KAAK,UAAU,oBAAoB;IAEtC,IAAA,oBAAU,EAAC,gBAAgB,CAAC,CAAC;IAC7B,MAAM,IAAA,6BAAa,GAAE,CAAC;AAC1B,CAAC"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export declare function GenerateScopedTypesCommand(): Promise<void>;
2
2
  //# sourceMappingURL=GenerateScopedTypes.Command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenerateScopedTypes.Command.d.ts","sourceRoot":"","sources":["../Source/GenerateScopedTypes.Command.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"GenerateScopedTypes.Command.d.ts","sourceRoot":"","sources":["../Source/GenerateScopedTypes.Command.ts"],"names":[],"mappings":"AAaA,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CA8BhE"}
@@ -5,11 +5,12 @@
5
5
  * License: MIT
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.GenerateScopedTypesCommand = GenerateScopedTypesCommand;
8
9
  /* eslint-disable jsdoc/require-jsdoc, no-console */
9
10
  const Config_1 = require("./Config");
10
11
  const Command_1 = require("./Command");
11
12
  const GenerateScopedTypes_1 = require("./GenerateScopedTypes");
12
- async function Main() {
13
+ async function GenerateScopedTypesCommand() {
13
14
  (0, Command_1.SetCommand)("generate-scoped-types");
14
15
  const Config = await (0, Config_1.GetConfigSafe)();
15
16
  const DefaultConfig = await (0, Config_1.GetDefaultConfig)();
@@ -28,5 +29,4 @@ async function Main() {
28
29
  /* eslint-disable-next-line @stylistic/max-len */
29
30
  `Writing scoped types module at ${DefaultLabelScopedModulePath} path ${Config.ScopedModulePath}...`, `Successfully created scoped types for PackageKey ${Config.PackageKey}!`, GenerateScopedTypes_1.GenerateScopedTypes);
30
31
  }
31
- Main();
32
32
  //# sourceMappingURL=GenerateScopedTypes.Command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenerateScopedTypes.Command.js","sourceRoot":"","sources":["../Source/GenerateScopedTypes.Command.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAEH,oDAAoD;AAEpD,qCAAsE;AACtE,uCAA4C;AAE5C,+DAA4D;AAE5D,KAAK,UAAU,IAAI;IAEf,IAAA,oBAAU,EAAC,uBAAuB,CAAC,CAAC;IAEpC,MAAM,MAAM,GAAc,MAAM,IAAA,sBAAa,GAAE,CAAC;IAChD,MAAM,aAAa,GAAc,MAAM,IAAA,yBAAgB,GAAE,CAAC;IAE1D,IAAI,CAAC,CAAC,MAAM,IAAA,kBAAS,GAAE,CAAC,EACxB,CAAC;QACG,iDAAiD;QACjD,OAAO,CAAC,GAAG,CAAC,2GAA2G,CAAC,CAAC;IAC7H,CAAC;IAED,MAAM,4BAA4B,GAC9B,MAAM,CAAC,gBAAgB,KAAK,aAAa,CAAC,gBAAgB;QACtD,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,EAAE,CAAC;IAEb,IAAI,CAAC,CAAC,MAAM,IAAA,kBAAS,GAAE,CAAC,EACxB,CAAC;QACG,iDAAiD;QACjD,OAAO,CAAC,GAAG,CAAC,2GAA2G,CAAC,CAAC;IAC7H,CAAC;IAED,MAAM,IAAA,aAAG;IACL,iDAAiD;IACjD,kCAAmC,4BAA6B,SAAU,MAAM,CAAC,gBAAiB,KAAK,EACvG,oDAAqD,MAAM,CAAC,UAAW,GAAG,EAC1E,yCAAmB,CACtB,CAAC;AACN,CAAC;AAED,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"GenerateScopedTypes.Command.js","sourceRoot":"","sources":["../Source/GenerateScopedTypes.Command.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AASH,gEA8BC;AArCD,oDAAoD;AAEpD,qCAAsE;AACtE,uCAA4C;AAE5C,+DAA4D;AAErD,KAAK,UAAU,0BAA0B;IAE5C,IAAA,oBAAU,EAAC,uBAAuB,CAAC,CAAC;IAEpC,MAAM,MAAM,GAAc,MAAM,IAAA,sBAAa,GAAE,CAAC;IAChD,MAAM,aAAa,GAAc,MAAM,IAAA,yBAAgB,GAAE,CAAC;IAE1D,IAAI,CAAC,CAAC,MAAM,IAAA,kBAAS,GAAE,CAAC,EACxB,CAAC;QACG,iDAAiD;QACjD,OAAO,CAAC,GAAG,CAAC,2GAA2G,CAAC,CAAC;IAC7H,CAAC;IAED,MAAM,4BAA4B,GAC9B,MAAM,CAAC,gBAAgB,KAAK,aAAa,CAAC,gBAAgB;QACtD,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,EAAE,CAAC;IAEb,IAAI,CAAC,CAAC,MAAM,IAAA,kBAAS,GAAE,CAAC,EACxB,CAAC;QACG,iDAAiD;QACjD,OAAO,CAAC,GAAG,CAAC,2GAA2G,CAAC,CAAC;IAC7H,CAAC;IAED,MAAM,IAAA,aAAG;IACL,iDAAiD;IACjD,kCAAmC,4BAA6B,SAAU,MAAM,CAAC,gBAAiB,KAAK,EACvG,oDAAqD,MAAM,CAAC,UAAW,GAAG,EAC1E,yCAAmB,CACtB,CAAC;AACN,CAAC"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export declare function SetupCommand(): Promise<void>;
2
2
  //# sourceMappingURL=Setup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Setup.d.ts","sourceRoot":"","sources":["../Source/Setup.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"Setup.d.ts","sourceRoot":"","sources":["../Source/Setup.ts"],"names":[],"mappings":"AA0CA,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CASlD"}
@@ -5,6 +5,7 @@
5
5
  * License: MIT
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.SetupCommand = SetupCommand;
8
9
  /* eslint-disable jsdoc/require-jsdoc, no-console */
9
10
  const Config_1 = require("./Config");
10
11
  const Command_1 = require("./Command");
@@ -28,11 +29,10 @@ async function Inner() {
28
29
  throw new Command_1.TryError(`A file was already found at ${ConfigPath}. Exiting!`);
29
30
  }
30
31
  }
31
- async function Main() {
32
+ async function SetupCommand() {
32
33
  (0, Command_1.SetCommand)("setup");
33
34
  (0, Command_1.Try)(
34
35
  /* eslint-disable-next-line @stylistic/max-len */
35
36
  "Writing the default config file to electron-reactive-event.config.json in the root of your package...", (Result) => `Successfully wrote the config file at\n\n ${Result}!`, Inner);
36
37
  }
37
- Main();
38
38
  //# sourceMappingURL=Setup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Setup.js","sourceRoot":"","sources":["../Source/Setup.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAEH,oDAAoD;AAEpD,qCAA4D;AAC5D,uCAAsD;AACtD,kDAA6D;AAC7D,2BAAgC;AAChC,+BAA+B;AAC/B,0CAAwC;AAExC,KAAK,UAAU,KAAK;IAEhB,MAAM,IAAI,GAAW,MAAM,IAAA,mCAAuB,GAAE,CAAC;IACrD,MAAM,UAAU,GAAW,IAAA,cAAO,EAAC,IAAI,EAAE,uBAAc,CAAC,CAAC;IACzD,IAAI,CAAC,IAAA,eAAU,EAAC,UAAU,CAAC,EAC3B,CAAC;QACG,IACA,CAAC;YACG,MAAM,IAAA,oBAAS,EACX,UAAU,EACV,IAAI,CAAC,SAAS,CAAC,MAAM,IAAA,yBAAgB,GAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EACjD,EAAE,QAAQ,EAAE,OAAO,EAAE,CACxB,CAAC;YAEF,OAAO,UAAU,CAAC;QACtB,CAAC;QACD,OAAO,KAAc,EACrB,CAAC;YACG,MAAM,IAAI,kBAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACzC,CAAC;IACL,CAAC;SAED,CAAC;QACG,MAAM,IAAI,kB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AG;IACC,iDAAiD;IACjD,uGAAuG,EACvG,CAAC,MAAc,EAAE,EAAE,CAAC,gDAAiD,MAAO,GAAG,EAC/E,KAAK,CACR,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "name": "electron-reactive-event-cli",
3
- "version": "1.0.63",
3
+ "version": "1.0.64",
4
4
  "description": "CLI utility for electron-reactive-event.",
5
5
  "bin": {
6
- "generate-scoped-types": "./Distribution/GenerateScopedTypes.js",
7
- "generate-types": "./Distribution/GenerateScopedTypes.js",
8
- "declare-events": "./Distribution/DeclareEvents.Command.js",
9
- "setup": "./Distribution/Setup.js",
10
- "set-up": "./Distribution/Setup.js"
6
+ "electron-reactive-event-cli": "./Distribution/Bin.js",
7
+ "reactive-cli": "./Distribution/Bin.js"
11
8
  },
12
9
  "files": [
13
10
  "./package.json",
@@ -35,10 +32,11 @@
35
32
  "main": "index.js",
36
33
  "scripts": {
37
34
  "build": "tsc -p ./tsconfig.json",
38
- "get-types": "node ./Distribution/Bin/WriteTypesToClipboard.js",
35
+ "get-types": "node ./Distribution/WriteTypesToClipboard.js",
39
36
  "generate-schema": "npx typescript-json-schema ./tsconfig.JsonSchema.json CliConfig --out ../ElectronReactiveEvent/Documentation/public/CliConfig.Schema.json"
40
37
  },
41
38
  "dependencies": {
39
+ "@sorrell/utilities": "^1.1.6",
42
40
  "ora": "^9.3.0",
43
41
  "typescript": "^6.0.2"
44
42
  }