isaacscript 2.0.11 → 2.0.14-dev.0
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.
- package/README.md +8 -4
- package/package.json +2 -53
- package/src/checkForWindowsTerminalBugs.d.ts +5 -0
- package/src/checkForWindowsTerminalBugs.js +80 -0
- package/src/checkForWindowsTerminalBugs.js.map +1 -0
- package/src/commands/copy/copy.d.ts +3 -0
- package/src/commands/copy/copy.js +33 -0
- package/src/commands/copy/copy.js.map +1 -0
- package/src/commands/init/checkIfProjectPathExists.d.ts +1 -0
- package/src/commands/init/checkIfProjectPathExists.js +30 -0
- package/src/commands/init/checkIfProjectPathExists.js.map +1 -0
- package/src/commands/init/checkModSubdirectory.d.ts +1 -0
- package/src/commands/init/checkModSubdirectory.js +16 -0
- package/src/commands/init/checkModSubdirectory.js.map +1 -0
- package/src/commands/init/checkModTargetDirectory.d.ts +1 -0
- package/src/commands/init/checkModTargetDirectory.js +33 -0
- package/src/commands/init/checkModTargetDirectory.js.map +1 -0
- package/src/commands/init/createMod.d.ts +1 -0
- package/{dist/src → src}/commands/init/createMod.js +137 -162
- package/src/commands/init/createMod.js.map +1 -0
- package/src/commands/init/getModsDir.d.ts +1 -0
- package/src/commands/init/getModsDir.js +58 -0
- package/src/commands/init/getModsDir.js.map +1 -0
- package/src/commands/init/getProjectPath.d.ts +1 -0
- package/src/commands/init/getProjectPath.js +93 -0
- package/src/commands/init/getProjectPath.js.map +1 -0
- package/src/commands/init/git.d.ts +4 -0
- package/{dist/src → src}/commands/init/git.js +152 -175
- package/src/commands/init/git.js.map +1 -0
- package/src/commands/init/init.d.ts +1 -0
- package/src/commands/init/init.js +70 -0
- package/src/commands/init/init.js.map +1 -0
- package/src/commands/init/installVSCodeExtensions.d.ts +1 -0
- package/src/commands/init/installVSCodeExtensions.js +33 -0
- package/src/commands/init/installVSCodeExtensions.js.map +1 -0
- package/src/commands/init/promptSaveSlot.d.ts +1 -0
- package/src/commands/init/promptSaveSlot.js +25 -0
- package/src/commands/init/promptSaveSlot.js.map +1 -0
- package/src/commands/init/promptVSCode.d.ts +1 -0
- package/src/commands/init/promptVSCode.js +27 -0
- package/src/commands/init/promptVSCode.js.map +1 -0
- package/src/commands/monitor/constants.d.ts +1 -0
- package/{dist/src → src}/commands/monitor/constants.js +4 -4
- package/src/commands/monitor/constants.js.map +1 -0
- package/src/commands/monitor/copyWatcherMod.d.ts +2 -0
- package/{dist/src → src}/commands/monitor/copyWatcherMod.js +38 -63
- package/src/commands/monitor/copyWatcherMod.js.map +1 -0
- package/src/commands/monitor/modDirectorySyncer/modDirectorySyncer.d.ts +1 -0
- package/{dist/src → src}/commands/monitor/modDirectorySyncer/modDirectorySyncer.js +49 -51
- package/src/commands/monitor/modDirectorySyncer/modDirectorySyncer.js.map +1 -0
- package/src/commands/monitor/monitor.d.ts +2 -0
- package/{dist/src → src}/commands/monitor/monitor.js +146 -171
- package/src/commands/monitor/monitor.js.map +1 -0
- package/src/commands/monitor/notifyGame.d.ts +3 -0
- package/{dist/src → src}/commands/monitor/notifyGame.js +57 -59
- package/src/commands/monitor/notifyGame.js.map +1 -0
- package/src/commands/monitor/saveDatWriter/saveDatWriter.d.ts +1 -0
- package/{dist/src → src}/commands/monitor/saveDatWriter/saveDatWriter.js +116 -141
- package/src/commands/monitor/saveDatWriter/saveDatWriter.js.map +1 -0
- package/src/commands/monitor/saveDatWriter/types.d.ts +5 -0
- package/{dist/src → src}/commands/monitor/saveDatWriter/types.js +2 -2
- package/src/commands/monitor/saveDatWriter/types.js.map +1 -0
- package/src/commands/monitor/spawnSaveDatWriter.d.ts +4 -0
- package/{dist/src → src}/commands/monitor/spawnSaveDatWriter.js +34 -36
- package/src/commands/monitor/spawnSaveDatWriter.js.map +1 -0
- package/src/commands/monitor/touchWatcherSaveDatFiles.d.ts +2 -0
- package/src/commands/monitor/touchWatcherSaveDatFiles.js +21 -0
- package/src/commands/monitor/touchWatcherSaveDatFiles.js.map +1 -0
- package/src/commands/publish/publish.d.ts +2 -0
- package/{dist/src → src}/commands/publish/publish.js +220 -260
- package/src/commands/publish/publish.js.map +1 -0
- package/src/configFile.d.ts +4 -0
- package/src/configFile.js +66 -0
- package/src/configFile.js.map +1 -0
- package/src/constants.d.ts +34 -0
- package/{dist/src → src}/constants.js +59 -61
- package/src/constants.js.map +1 -0
- package/src/exec.d.ts +4 -0
- package/{dist/src → src}/exec.js +95 -97
- package/src/exec.js.map +1 -0
- package/src/file.d.ts +12 -0
- package/{dist/src → src}/file.js +193 -195
- package/src/file.js.map +1 -0
- package/src/main.d.ts +2 -0
- package/src/main.js +122 -0
- package/src/main.js.map +1 -0
- package/src/parseArgs.d.ts +1 -0
- package/{dist/src → src}/parseArgs.js +106 -108
- package/src/parseArgs.js.map +1 -0
- package/src/prompt.d.ts +5 -0
- package/src/prompt.js +93 -0
- package/src/prompt.js.map +1 -0
- package/src/types/Command.d.ts +2 -0
- package/{dist/src → src}/types/Command.js +4 -4
- package/src/types/Command.js.map +1 -0
- package/src/types/Config.d.ts +18 -0
- package/{dist/src → src}/types/Config.js +12 -12
- package/src/types/Config.js.map +1 -0
- package/src/types/GitHubCLIHostsYAML.d.ts +7 -0
- package/{dist/src → src}/types/GitHubCLIHostsYAML.js +2 -2
- package/src/types/GitHubCLIHostsYAML.js.map +1 -0
- package/src/utils.d.ts +13 -0
- package/{dist/src → src}/utils.js +81 -83
- package/src/utils.js.map +1 -0
- package/src/validateInIsaacScriptProject.d.ts +1 -0
- package/src/validateInIsaacScriptProject.js +27 -0
- package/src/validateInIsaacScriptProject.js.map +1 -0
- package/src/validateNodeVersion.d.ts +5 -0
- package/{dist/src → src}/validateNodeVersion.js +24 -26
- package/src/validateNodeVersion.js.map +1 -0
- package/src/validateOS.d.ts +1 -0
- package/{dist/src → src}/validateOS.js +16 -18
- package/src/validateOS.js.map +1 -0
- package/LICENSE +0 -674
- package/dist/package.json +0 -57
- package/dist/src/checkForWindowsTerminalBugs.js +0 -101
- package/dist/src/commands/copy/copy.js +0 -58
- package/dist/src/commands/init/checkIfProjectPathExists.js +0 -53
- package/dist/src/commands/init/checkModSubdirectory.js +0 -41
- package/dist/src/commands/init/checkModTargetDirectory.js +0 -56
- package/dist/src/commands/init/getModsDir.js +0 -81
- package/dist/src/commands/init/getProjectPath.js +0 -91
- package/dist/src/commands/init/init.js +0 -68
- package/dist/src/commands/init/installVSCodeExtensions.js +0 -58
- package/dist/src/commands/init/promptSaveSlot.js +0 -22
- package/dist/src/commands/init/promptVSCode.js +0 -27
- package/dist/src/commands/monitor/touchWatcherSaveDatFiles.js +0 -46
- package/dist/src/configFile.js +0 -89
- package/dist/src/main.js +0 -136
- package/dist/src/prompt.js +0 -89
- package/dist/src/validateInIsaacScriptProject.js +0 -52
- package/isaacscript-watcher/.luacheckrc +0 -96
- package/isaacscript-watcher/README.md +0 -8
- package/isaacscript-watcher/main.lua +0 -270
- package/isaacscript-watcher/metadata.xml +0 -7
- package/isaacscript-watcher/resources/gfx/logo.anm2 +0 -27
- package/isaacscript-watcher/resources/gfx/logo.png +0 -0
|
@@ -1,64 +1,39 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// always the latest version.
|
|
40
|
-
if (file.exists(watcherModPath, verbose)) {
|
|
41
|
-
file.deleteFileOrDirectory(watcherModPath, verbose);
|
|
42
|
-
}
|
|
43
|
-
file.copy(constants_1.WATCHER_MOD_SOURCE_PATH, watcherModPath, verbose);
|
|
44
|
-
if (watcherModDisabled) {
|
|
45
|
-
// Since we deleted the directory, the "disable.it" file was deleted. Restore it.
|
|
46
|
-
file.write(disableItPath, "", verbose);
|
|
47
|
-
}
|
|
48
|
-
// By default, the IsaacScript watcher mod automatically restarts the game, so we only need to
|
|
49
|
-
// disable it if the config option is explicitly set to false.
|
|
50
|
-
if (config.enableIsaacScriptWatcherAutoRestart === false) {
|
|
51
|
-
disableIsaacScriptWatcherAutomaticRestart(watcherModPath, verbose);
|
|
52
|
-
}
|
|
53
|
-
// If we copied a new version of the watcher mod into place, but the user currently has the game
|
|
54
|
-
// open, then the old version will stay loaded. However, if the watcher mod reloads itself, the
|
|
55
|
-
// game will crash, so there is no automated solution for this.
|
|
56
|
-
}
|
|
57
|
-
exports.copyWatcherMod = copyWatcherMod;
|
|
58
|
-
function disableIsaacScriptWatcherAutomaticRestart(watcherModPath, verbose) {
|
|
59
|
-
const mainLuaPath = path_1.default.join(watcherModPath, constants_1.MAIN_LUA);
|
|
60
|
-
const mainLua = file.read(mainLuaPath, verbose);
|
|
61
|
-
const modifiedMainLua = mainLua.replace("local RESTART_GAME_ON_RECOMPILATION = true", "local RESTART_GAME_ON_RECOMPILATION = false");
|
|
62
|
-
file.write(mainLuaPath, modifiedMainLua, verbose);
|
|
63
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.copyWatcherMod = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const file = tslib_1.__importStar(require("../../file"));
|
|
8
|
+
function copyWatcherMod(config, verbose) {
|
|
9
|
+
// Check to see if this mod was disabled.
|
|
10
|
+
const watcherModPath = path_1.default.join(config.modsDirectory, constants_1.WATCHER_MOD_NAME);
|
|
11
|
+
const disableItPath = path_1.default.join(watcherModPath, constants_1.DISABLE_IT_FILE);
|
|
12
|
+
const watcherModDisabled = file.exists(disableItPath, verbose);
|
|
13
|
+
// Delete and re-copy the watcher mod every time IsaacScript starts. This ensures that it is
|
|
14
|
+
// always the latest version.
|
|
15
|
+
if (file.exists(watcherModPath, verbose)) {
|
|
16
|
+
file.deleteFileOrDirectory(watcherModPath, verbose);
|
|
17
|
+
}
|
|
18
|
+
file.copy(constants_1.WATCHER_MOD_SOURCE_PATH, watcherModPath, verbose);
|
|
19
|
+
if (watcherModDisabled) {
|
|
20
|
+
// Since we deleted the directory, the "disable.it" file was deleted. Restore it.
|
|
21
|
+
file.write(disableItPath, "", verbose);
|
|
22
|
+
}
|
|
23
|
+
// By default, the IsaacScript watcher mod automatically restarts the game, so we only need to
|
|
24
|
+
// disable it if the config option is explicitly set to false.
|
|
25
|
+
if (config.enableIsaacScriptWatcherAutoRestart === false) {
|
|
26
|
+
disableIsaacScriptWatcherAutomaticRestart(watcherModPath, verbose);
|
|
27
|
+
}
|
|
28
|
+
// If we copied a new version of the watcher mod into place, but the user currently has the game
|
|
29
|
+
// open, then the old version will stay loaded. However, if the watcher mod reloads itself, the
|
|
30
|
+
// game will crash, so there is no automated solution for this.
|
|
31
|
+
}
|
|
32
|
+
exports.copyWatcherMod = copyWatcherMod;
|
|
33
|
+
function disableIsaacScriptWatcherAutomaticRestart(watcherModPath, verbose) {
|
|
34
|
+
const mainLuaPath = path_1.default.join(watcherModPath, constants_1.MAIN_LUA);
|
|
35
|
+
const mainLua = file.read(mainLuaPath, verbose);
|
|
36
|
+
const modifiedMainLua = mainLua.replace("local RESTART_GAME_ON_RECOMPILATION = true", "local RESTART_GAME_ON_RECOMPILATION = false");
|
|
37
|
+
file.write(mainLuaPath, modifiedMainLua, verbose);
|
|
38
|
+
}
|
|
64
39
|
//# sourceMappingURL=copyWatcherMod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyWatcherMod.js","sourceRoot":"","sources":["../../../../../../packages/isaacscript-cli/src/commands/monitor/copyWatcherMod.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AACxB,+CAKyB;AACzB,yDAAmC;AAGnC,SAAgB,cAAc,CAAC,MAAc,EAAE,OAAgB;IAC7D,yCAAyC;IACzC,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,4BAAgB,CAAC,CAAC;IACzE,MAAM,aAAa,GAAG,cAAI,CAAC,IAAI,CAAC,cAAc,EAAE,2BAAe,CAAC,CAAC;IACjE,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAE/D,4FAA4F;IAC5F,6BAA6B;IAC7B,IAAI,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,EAAE;QACxC,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;KACrD;IAED,IAAI,CAAC,IAAI,CAAC,mCAAuB,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IAE5D,IAAI,kBAAkB,EAAE;QACtB,iFAAiF;QACjF,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;KACxC;IAED,8FAA8F;IAC9F,8DAA8D;IAC9D,IAAI,MAAM,CAAC,mCAAmC,KAAK,KAAK,EAAE;QACxD,yCAAyC,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;KACpE;IAED,gGAAgG;IAChG,+FAA+F;IAC/F,+DAA+D;AACjE,CAAC;AA5BD,wCA4BC;AAED,SAAS,yCAAyC,CAChD,cAAsB,EACtB,OAAgB;IAEhB,MAAM,WAAW,GAAG,cAAI,CAAC,IAAI,CAAC,cAAc,EAAE,oBAAQ,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAEhD,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CACrC,4CAA4C,EAC5C,6CAA6C,CAC9C,CAAC;IAEF,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,52 +1,50 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
modSourcePath
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const sync_directory_1 = tslib_1.__importDefault(require("sync-directory"));
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const SUBPROCESS_NAME = "directory syncer";
|
|
7
|
+
const BASE_ARGV_LENGTH = 2;
|
|
8
|
+
let modSourcePath;
|
|
9
|
+
let modTargetPath;
|
|
10
|
+
init();
|
|
11
|
+
function init() {
|
|
12
|
+
const firstArg = process.argv[BASE_ARGV_LENGTH];
|
|
13
|
+
if (firstArg === undefined) {
|
|
14
|
+
throw new Error(`The ${SUBPROCESS_NAME} process did not get a valid first argument.`);
|
|
15
|
+
}
|
|
16
|
+
const secondArg = process.argv[BASE_ARGV_LENGTH + 1];
|
|
17
|
+
if (secondArg === undefined) {
|
|
18
|
+
throw new Error(`The ${SUBPROCESS_NAME} process did not get the right amount of arguments.`);
|
|
19
|
+
}
|
|
20
|
+
modSourcePath = firstArg;
|
|
21
|
+
modTargetPath = secondArg;
|
|
22
|
+
(0, sync_directory_1.default)(modSourcePath, modTargetPath, {
|
|
23
|
+
watch: true,
|
|
24
|
+
type: "copy",
|
|
25
|
+
afterEachSync,
|
|
26
|
+
onError,
|
|
27
|
+
chokidarWatchOptions: {
|
|
28
|
+
awaitWriteFinish: {
|
|
29
|
+
stabilityThreshold: 1000,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function afterEachSync(params) {
|
|
35
|
+
if (params === undefined) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (params.eventType !== "init:copy") {
|
|
39
|
+
send(`${constants_1.FILE_SYNCED_MESSAGE} ${params.relativePath}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function onError(err) {
|
|
43
|
+
send(`The directory syncer encountered an error: ${err}`);
|
|
44
|
+
}
|
|
45
|
+
function send(msg) {
|
|
46
|
+
if (process.send !== undefined) {
|
|
47
|
+
process.send(msg);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
52
50
|
//# sourceMappingURL=modDirectorySyncer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modDirectorySyncer.js","sourceRoot":"","sources":["../../../../../../../packages/isaacscript-cli/src/commands/monitor/modDirectorySyncer/modDirectorySyncer.ts"],"names":[],"mappings":";;;AAAA,4EAA2C;AAC3C,kDAAyD;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AI,CAAC,GAAG,CAAC,CAAC;KACnB;AACH,CAAC"}
|
|
@@ -1,172 +1,147 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
notifyGame.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
(0, utils_1.error)(`Error: ${processDescription} subprocess exited with code: ${code}`);
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
function getFirstTSConfigIncludePath(verbose) {
|
|
151
|
-
const tsConfigRaw = file.read(constants_1.TSCONFIG_PATH, verbose);
|
|
152
|
-
let tsConfig;
|
|
153
|
-
try {
|
|
154
|
-
tsConfig = JSONC.parse(tsConfigRaw);
|
|
155
|
-
}
|
|
156
|
-
catch (err) {
|
|
157
|
-
(0, utils_1.error)(`Failed to parse "${chalk_1.default.green(constants_1.TSCONFIG_PATH)}":`, err);
|
|
158
|
-
}
|
|
159
|
-
const include = tsConfig["include"];
|
|
160
|
-
if (include === undefined) {
|
|
161
|
-
(0, utils_1.error)(`Your "${chalk_1.default.green(constants_1.TSCONFIG_PATH)}" file does not have an "include" property, which is surely a mistake. Delete the file and re-run ${constants_1.PROJECT_NAME}.`);
|
|
162
|
-
}
|
|
163
|
-
if (!Array.isArray(include)) {
|
|
164
|
-
(0, utils_1.error)(`Your "${chalk_1.default.green(constants_1.TSCONFIG_PATH)}" file has an "include" property that is not an array, which is surely a mistake. Delete the file and re-run ${constants_1.PROJECT_NAME}.`);
|
|
165
|
-
}
|
|
166
|
-
const firstInclude = include[0];
|
|
167
|
-
if (firstInclude === undefined) {
|
|
168
|
-
(0, utils_1.error)(`Your "${chalk_1.default.green(constants_1.TSCONFIG_PATH)}" file has an empty "include" property, which is surely a mistake. Delete the file and re-run ${constants_1.PROJECT_NAME}.`);
|
|
169
|
-
}
|
|
170
|
-
return firstInclude;
|
|
171
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.monitor = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const child_process_1 = require("child_process");
|
|
7
|
+
const JSONC = tslib_1.__importStar(require("jsonc-parser"));
|
|
8
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
9
|
+
const constants_1 = require("../../constants");
|
|
10
|
+
const file = tslib_1.__importStar(require("../../file"));
|
|
11
|
+
const utils_1 = require("../../utils");
|
|
12
|
+
const constants_2 = require("./constants");
|
|
13
|
+
const copyWatcherMod_1 = require("./copyWatcherMod");
|
|
14
|
+
const notifyGame = tslib_1.__importStar(require("./notifyGame"));
|
|
15
|
+
const spawnSaveDatWriter_1 = require("./spawnSaveDatWriter");
|
|
16
|
+
const touchWatcherSaveDatFiles_1 = require("./touchWatcherSaveDatFiles");
|
|
17
|
+
let compilationStartTime = new Date();
|
|
18
|
+
function monitor(argv, config) {
|
|
19
|
+
const verbose = argv["verbose"] === true;
|
|
20
|
+
// If they specified some command-line flags, override the values found in the config file.
|
|
21
|
+
if (argv["modsDirectory"] !== undefined) {
|
|
22
|
+
config.modsDirectory = argv["modsDirectory"]; // eslint-disable-line no-param-reassign
|
|
23
|
+
}
|
|
24
|
+
if (argv["saveSlot"] !== undefined) {
|
|
25
|
+
config.saveSlot = argv["saveSlot"]; // eslint-disable-line no-param-reassign
|
|
26
|
+
}
|
|
27
|
+
// Read the "tsconfig.json" file.
|
|
28
|
+
const tsConfigInclude = getFirstTSConfigIncludePath(verbose);
|
|
29
|
+
const resolvedIncludePath = path_1.default.resolve(constants_1.CWD, tsConfigInclude);
|
|
30
|
+
const modTargetDirectoryName = (0, utils_1.getModTargetDirectoryName)(config);
|
|
31
|
+
const modTargetPath = path_1.default.join(config.modsDirectory, modTargetDirectoryName);
|
|
32
|
+
// Prepare the IsaacScript watcher mod.
|
|
33
|
+
(0, copyWatcherMod_1.copyWatcherMod)(config, verbose);
|
|
34
|
+
(0, touchWatcherSaveDatFiles_1.touchWatcherSaveDatFiles)(config, verbose);
|
|
35
|
+
// Delete and re-copy the mod every time IsaacScript starts. This ensures that it is always the
|
|
36
|
+
// latest version.
|
|
37
|
+
if (file.exists(modTargetPath, verbose)) {
|
|
38
|
+
file.deleteFileOrDirectory(modTargetPath, true);
|
|
39
|
+
}
|
|
40
|
+
// Subprocess #1 - The "save#.dat" file writer.
|
|
41
|
+
(0, spawnSaveDatWriter_1.spawnSaveDatWriter)(config);
|
|
42
|
+
// Subprocess #2 - The mod directory syncer.
|
|
43
|
+
spawnModDirectorySyncer(config);
|
|
44
|
+
// Subprocess #3 - tstl --watch (to automatically convert TypeScript to Lua).
|
|
45
|
+
spawnTSTLWatcher();
|
|
46
|
+
// Also, start constantly pinging the watcher mod.
|
|
47
|
+
setInterval(() => {
|
|
48
|
+
notifyGame.ping();
|
|
49
|
+
}, 1000); // Every second
|
|
50
|
+
console.log("Automatically monitoring the following for changes:");
|
|
51
|
+
console.log(`1) your TypeScript code: ${chalk_1.default.green(resolvedIncludePath)}`);
|
|
52
|
+
console.log(`2) the source mod directory: ${chalk_1.default.green(constants_1.MOD_SOURCE_PATH)}`);
|
|
53
|
+
console.log("");
|
|
54
|
+
console.log(`Copying files to: ${chalk_1.default.green(modTargetPath)}`);
|
|
55
|
+
console.log("");
|
|
56
|
+
// (The process will now continue indefinitely for as long as the subprocesses exist.)
|
|
57
|
+
}
|
|
58
|
+
exports.monitor = monitor;
|
|
59
|
+
function spawnModDirectorySyncer(config) {
|
|
60
|
+
const processName = "modDirectorySyncer";
|
|
61
|
+
const processDescription = "Directory syncer";
|
|
62
|
+
const processPath = path_1.default.join(__dirname, processName, processName);
|
|
63
|
+
const modTargetName = (0, utils_1.getModTargetDirectoryName)(config);
|
|
64
|
+
const modTargetPath = path_1.default.join(config.modsDirectory, modTargetName);
|
|
65
|
+
const directorySyncer = (0, child_process_1.fork)(processPath, [constants_1.MOD_SOURCE_PATH, modTargetPath]);
|
|
66
|
+
directorySyncer.on("message", (msg) => {
|
|
67
|
+
notifyGame.msg(msg);
|
|
68
|
+
// If the "main.lua" file was successfully copied over, we also have to tell isaacscript-watcher
|
|
69
|
+
// to reload the mod. Look for something like: "File synced: \main.lua"
|
|
70
|
+
if (msg === `${constants_1.FILE_SYNCED_MESSAGE} ${path_1.default.sep}${constants_1.MAIN_LUA}`) {
|
|
71
|
+
notifyGame.command(`luamod ${modTargetName}`);
|
|
72
|
+
notifyGame.command("restart");
|
|
73
|
+
notifyGame.msg("Reloaded the mod.");
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
directorySyncer.on("close", (code) => {
|
|
77
|
+
(0, utils_1.error)(`Error: ${processDescription} subprocess closed with code: ${code}`);
|
|
78
|
+
});
|
|
79
|
+
directorySyncer.on("exit", (code) => {
|
|
80
|
+
(0, utils_1.error)(`Error: ${processDescription} subprocess exited with code: ${code}`);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function spawnTSTLWatcher() {
|
|
84
|
+
const processDescription = "tstl";
|
|
85
|
+
const tstl = (0, child_process_1.spawn)("npx", ["tstl", "--watch", "--preserveWatchOutput"], {
|
|
86
|
+
shell: true,
|
|
87
|
+
});
|
|
88
|
+
tstl.stdout.on("data", (data) => {
|
|
89
|
+
const msg = data.toString().trim();
|
|
90
|
+
if (msg.includes("Starting compilation in watch mode...")) {
|
|
91
|
+
const newMsg = `${constants_1.PROJECT_NAME} is now watching for changes.`;
|
|
92
|
+
notifyGame.msg(newMsg);
|
|
93
|
+
}
|
|
94
|
+
else if (msg.includes("File change detected. Starting incremental compilation...")) {
|
|
95
|
+
compilationStartTime = new Date();
|
|
96
|
+
const newMsg = "TypeScript change detected. Compiling...";
|
|
97
|
+
notifyGame.msg(newMsg);
|
|
98
|
+
}
|
|
99
|
+
else if (msg.includes("Found 0 errors. Watching for file changes.")) {
|
|
100
|
+
const compilationFinishTime = new Date();
|
|
101
|
+
const elapsedTimeMilliseconds = compilationFinishTime.getTime() - compilationStartTime.getTime();
|
|
102
|
+
const elapsedTimeSeconds = elapsedTimeMilliseconds / 1000;
|
|
103
|
+
const newMsg = `${constants_2.COMPILATION_SUCCESSFUL} (in ${elapsedTimeSeconds} seconds)`;
|
|
104
|
+
notifyGame.msg(newMsg);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
notifyGame.msg(msg);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
tstl.stderr.on("data", (data) => {
|
|
111
|
+
const msg = data.toString().trim();
|
|
112
|
+
if (msg === "^C") {
|
|
113
|
+
// Hide the line that appears when you cancel the program with `Ctrl + c`.
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
notifyGame.msg(`Error: ${msg}`);
|
|
117
|
+
});
|
|
118
|
+
tstl.on("close", (code) => {
|
|
119
|
+
(0, utils_1.error)(`Error: ${processDescription} subprocess exited with code: ${code}`);
|
|
120
|
+
});
|
|
121
|
+
tstl.on("exit", (code) => {
|
|
122
|
+
(0, utils_1.error)(`Error: ${processDescription} subprocess exited with code: ${code}`);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function getFirstTSConfigIncludePath(verbose) {
|
|
126
|
+
const tsConfigRaw = file.read(constants_1.TSCONFIG_PATH, verbose);
|
|
127
|
+
let tsConfig;
|
|
128
|
+
try {
|
|
129
|
+
tsConfig = JSONC.parse(tsConfigRaw);
|
|
130
|
+
}
|
|
131
|
+
catch (err) {
|
|
132
|
+
(0, utils_1.error)(`Failed to parse "${chalk_1.default.green(constants_1.TSCONFIG_PATH)}":`, err);
|
|
133
|
+
}
|
|
134
|
+
const include = tsConfig["include"];
|
|
135
|
+
if (include === undefined) {
|
|
136
|
+
(0, utils_1.error)(`Your "${chalk_1.default.green(constants_1.TSCONFIG_PATH)}" file does not have an "include" property, which is surely a mistake. Delete the file and re-run ${constants_1.PROJECT_NAME}.`);
|
|
137
|
+
}
|
|
138
|
+
if (!Array.isArray(include)) {
|
|
139
|
+
(0, utils_1.error)(`Your "${chalk_1.default.green(constants_1.TSCONFIG_PATH)}" file has an "include" property that is not an array, which is surely a mistake. Delete the file and re-run ${constants_1.PROJECT_NAME}.`);
|
|
140
|
+
}
|
|
141
|
+
const firstInclude = include[0];
|
|
142
|
+
if (firstInclude === undefined) {
|
|
143
|
+
(0, utils_1.error)(`Your "${chalk_1.default.green(constants_1.TSCONFIG_PATH)}" file has an empty "include" property, which is surely a mistake. Delete the file and re-run ${constants_1.PROJECT_NAME}.`);
|
|
144
|
+
}
|
|
145
|
+
return firstInclude;
|
|
146
|
+
}
|
|
172
147
|
//# sourceMappingURL=monitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitor.js","sourceRoot":"","sources":["../../../../../../packages/isaacscript-cli/src/commands/monitor/monitor.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,iDAA4C;AAC5C,4DAAsC;AACtC,wDAAwB;AACxB,+CAOyB;AACzB,yDAAmC;AAEnC,uCAA+D;AAC/D,2CAAqD;AACrD,qDAAkD;AAClD,iEAA2C;AAC3C,6DAA0D;AAC1D,yEAAsE;AAEtE,IAAI,oBAAoB,GAAG,IAAI,IAAI,EAAE,CAAC;AAEtC,SAAgB,OAAO,CAAC,IAA6B,EAAE,MA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