electron-reactive-event-cli 1.0.94 → 1.0.95
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.
|
@@ -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":"AAmEA,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CASlD"}
|
package/Distribution/Setup.js
CHANGED
|
@@ -13,12 +13,32 @@ const utilities_1 = require("@sorrell/utilities");
|
|
|
13
13
|
const fs_1 = require("fs");
|
|
14
14
|
const path_1 = require("path");
|
|
15
15
|
const promises_1 = require("fs/promises");
|
|
16
|
+
async function GetDefaultWrittenConfig() {
|
|
17
|
+
const Lines = JSON.stringify(await (0, Config_1.GetDefaultConfig)(), null, 4).split("\n");
|
|
18
|
+
const InsertionIndex = Lines.findIndex((Line) => {
|
|
19
|
+
return Line.includes("AugmentationModulePath: string;");
|
|
20
|
+
});
|
|
21
|
+
const CommentedContent = `// /**
|
|
22
|
+
// * \`electron-reactive-event-cli\` can create modules for you that export the reactive
|
|
23
|
+
// * IPC functions, scoped to your \`PackageKey\`.
|
|
24
|
+
// */
|
|
25
|
+
// IpcModulePath?:
|
|
26
|
+
// {
|
|
27
|
+
// /** The path of the module that calls \`getReactiveIpcMain\`, and exports its output. */
|
|
28
|
+
// Main?: string;
|
|
29
|
+
|
|
30
|
+
// /** The path of the module that calls \`getReactiveIpcHooks\`, and exports its output. */
|
|
31
|
+
// Renderer?: string;
|
|
32
|
+
// };
|
|
33
|
+
`.split("\n");
|
|
34
|
+
return Lines.toSpliced(InsertionIndex, 0, ...CommentedContent, "\n").join("\n");
|
|
35
|
+
}
|
|
16
36
|
async function Inner() {
|
|
17
37
|
const Root = await (0, utilities_1.GetPackageRootDirectory)();
|
|
18
38
|
const ConfigPath = (0, path_1.resolve)(Root, Config_1.ConfigFileName);
|
|
19
39
|
if (!(0, fs_1.existsSync)(ConfigPath)) {
|
|
20
40
|
try {
|
|
21
|
-
await (0, promises_1.writeFile)(ConfigPath,
|
|
41
|
+
await (0, promises_1.writeFile)(ConfigPath, await GetDefaultWrittenConfig(), { encoding: "utf-8" });
|
|
22
42
|
return ConfigPath;
|
|
23
43
|
}
|
|
24
44
|
catch (Error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Setup.js","sourceRoot":"","sources":["../Source/Setup.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;
|
|
1
|
+
{"version":3,"file":"Setup.js","sourceRoot":"","sources":["../Source/Setup.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA+DH,oCASC;AAtED,oDAAoD;AAEpD,qCAA4D;AAC5D,uCAAsD;AACtD,kDAA6D;AAC7D,2BAAgC;AAChC,+BAA+B;AAC/B,0CAAwC;AAExC,KAAK,UAAU,uBAAuB;IAElC,MAAM,KAAK,GAAkB,IAAI,CAAC,SAAS,CAAC,MAAM,IAAA,yBAAgB,GAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3F,MAAM,cAAc,GAAW,KAAK,CAAC,SAAS,CAAC,CAAC,IAAY,EAAW,EAAE;QAErE,OAAO,IAAI,CAAC,QAAQ,CAAC,iCAAiC,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,MAAM,gBAAgB,GAAkB;;;;;;;;;;;;CAY3C,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEV,OAAO,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC,EAAE,GAAG,gBAAgB,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpF,CAAC;AAED,KAAK,UAAU,KAAK;IAEhB,MAAM,IAAI,GAAW,MAAM,IAAA,mCAAuB,GAAE,CAAC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