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.
Files changed (137) hide show
  1. package/README.md +8 -4
  2. package/package.json +2 -53
  3. package/src/checkForWindowsTerminalBugs.d.ts +5 -0
  4. package/src/checkForWindowsTerminalBugs.js +80 -0
  5. package/src/checkForWindowsTerminalBugs.js.map +1 -0
  6. package/src/commands/copy/copy.d.ts +3 -0
  7. package/src/commands/copy/copy.js +33 -0
  8. package/src/commands/copy/copy.js.map +1 -0
  9. package/src/commands/init/checkIfProjectPathExists.d.ts +1 -0
  10. package/src/commands/init/checkIfProjectPathExists.js +30 -0
  11. package/src/commands/init/checkIfProjectPathExists.js.map +1 -0
  12. package/src/commands/init/checkModSubdirectory.d.ts +1 -0
  13. package/src/commands/init/checkModSubdirectory.js +16 -0
  14. package/src/commands/init/checkModSubdirectory.js.map +1 -0
  15. package/src/commands/init/checkModTargetDirectory.d.ts +1 -0
  16. package/src/commands/init/checkModTargetDirectory.js +33 -0
  17. package/src/commands/init/checkModTargetDirectory.js.map +1 -0
  18. package/src/commands/init/createMod.d.ts +1 -0
  19. package/{dist/src → src}/commands/init/createMod.js +137 -162
  20. package/src/commands/init/createMod.js.map +1 -0
  21. package/src/commands/init/getModsDir.d.ts +1 -0
  22. package/src/commands/init/getModsDir.js +58 -0
  23. package/src/commands/init/getModsDir.js.map +1 -0
  24. package/src/commands/init/getProjectPath.d.ts +1 -0
  25. package/src/commands/init/getProjectPath.js +93 -0
  26. package/src/commands/init/getProjectPath.js.map +1 -0
  27. package/src/commands/init/git.d.ts +4 -0
  28. package/{dist/src → src}/commands/init/git.js +152 -175
  29. package/src/commands/init/git.js.map +1 -0
  30. package/src/commands/init/init.d.ts +1 -0
  31. package/src/commands/init/init.js +70 -0
  32. package/src/commands/init/init.js.map +1 -0
  33. package/src/commands/init/installVSCodeExtensions.d.ts +1 -0
  34. package/src/commands/init/installVSCodeExtensions.js +33 -0
  35. package/src/commands/init/installVSCodeExtensions.js.map +1 -0
  36. package/src/commands/init/promptSaveSlot.d.ts +1 -0
  37. package/src/commands/init/promptSaveSlot.js +25 -0
  38. package/src/commands/init/promptSaveSlot.js.map +1 -0
  39. package/src/commands/init/promptVSCode.d.ts +1 -0
  40. package/src/commands/init/promptVSCode.js +27 -0
  41. package/src/commands/init/promptVSCode.js.map +1 -0
  42. package/src/commands/monitor/constants.d.ts +1 -0
  43. package/{dist/src → src}/commands/monitor/constants.js +4 -4
  44. package/src/commands/monitor/constants.js.map +1 -0
  45. package/src/commands/monitor/copyWatcherMod.d.ts +2 -0
  46. package/{dist/src → src}/commands/monitor/copyWatcherMod.js +38 -63
  47. package/src/commands/monitor/copyWatcherMod.js.map +1 -0
  48. package/src/commands/monitor/modDirectorySyncer/modDirectorySyncer.d.ts +1 -0
  49. package/{dist/src → src}/commands/monitor/modDirectorySyncer/modDirectorySyncer.js +49 -51
  50. package/src/commands/monitor/modDirectorySyncer/modDirectorySyncer.js.map +1 -0
  51. package/src/commands/monitor/monitor.d.ts +2 -0
  52. package/{dist/src → src}/commands/monitor/monitor.js +146 -171
  53. package/src/commands/monitor/monitor.js.map +1 -0
  54. package/src/commands/monitor/notifyGame.d.ts +3 -0
  55. package/{dist/src → src}/commands/monitor/notifyGame.js +57 -59
  56. package/src/commands/monitor/notifyGame.js.map +1 -0
  57. package/src/commands/monitor/saveDatWriter/saveDatWriter.d.ts +1 -0
  58. package/{dist/src → src}/commands/monitor/saveDatWriter/saveDatWriter.js +116 -141
  59. package/src/commands/monitor/saveDatWriter/saveDatWriter.js.map +1 -0
  60. package/src/commands/monitor/saveDatWriter/types.d.ts +5 -0
  61. package/{dist/src → src}/commands/monitor/saveDatWriter/types.js +2 -2
  62. package/src/commands/monitor/saveDatWriter/types.js.map +1 -0
  63. package/src/commands/monitor/spawnSaveDatWriter.d.ts +4 -0
  64. package/{dist/src → src}/commands/monitor/spawnSaveDatWriter.js +34 -36
  65. package/src/commands/monitor/spawnSaveDatWriter.js.map +1 -0
  66. package/src/commands/monitor/touchWatcherSaveDatFiles.d.ts +2 -0
  67. package/src/commands/monitor/touchWatcherSaveDatFiles.js +21 -0
  68. package/src/commands/monitor/touchWatcherSaveDatFiles.js.map +1 -0
  69. package/src/commands/publish/publish.d.ts +2 -0
  70. package/{dist/src → src}/commands/publish/publish.js +220 -260
  71. package/src/commands/publish/publish.js.map +1 -0
  72. package/src/configFile.d.ts +4 -0
  73. package/src/configFile.js +66 -0
  74. package/src/configFile.js.map +1 -0
  75. package/src/constants.d.ts +34 -0
  76. package/{dist/src → src}/constants.js +59 -61
  77. package/src/constants.js.map +1 -0
  78. package/src/exec.d.ts +4 -0
  79. package/{dist/src → src}/exec.js +95 -97
  80. package/src/exec.js.map +1 -0
  81. package/src/file.d.ts +12 -0
  82. package/{dist/src → src}/file.js +193 -195
  83. package/src/file.js.map +1 -0
  84. package/src/main.d.ts +2 -0
  85. package/src/main.js +122 -0
  86. package/src/main.js.map +1 -0
  87. package/src/parseArgs.d.ts +1 -0
  88. package/{dist/src → src}/parseArgs.js +106 -108
  89. package/src/parseArgs.js.map +1 -0
  90. package/src/prompt.d.ts +5 -0
  91. package/src/prompt.js +93 -0
  92. package/src/prompt.js.map +1 -0
  93. package/src/types/Command.d.ts +2 -0
  94. package/{dist/src → src}/types/Command.js +4 -4
  95. package/src/types/Command.js.map +1 -0
  96. package/src/types/Config.d.ts +18 -0
  97. package/{dist/src → src}/types/Config.js +12 -12
  98. package/src/types/Config.js.map +1 -0
  99. package/src/types/GitHubCLIHostsYAML.d.ts +7 -0
  100. package/{dist/src → src}/types/GitHubCLIHostsYAML.js +2 -2
  101. package/src/types/GitHubCLIHostsYAML.js.map +1 -0
  102. package/src/utils.d.ts +13 -0
  103. package/{dist/src → src}/utils.js +81 -83
  104. package/src/utils.js.map +1 -0
  105. package/src/validateInIsaacScriptProject.d.ts +1 -0
  106. package/src/validateInIsaacScriptProject.js +27 -0
  107. package/src/validateInIsaacScriptProject.js.map +1 -0
  108. package/src/validateNodeVersion.d.ts +5 -0
  109. package/{dist/src → src}/validateNodeVersion.js +24 -26
  110. package/src/validateNodeVersion.js.map +1 -0
  111. package/src/validateOS.d.ts +1 -0
  112. package/{dist/src → src}/validateOS.js +16 -18
  113. package/src/validateOS.js.map +1 -0
  114. package/LICENSE +0 -674
  115. package/dist/package.json +0 -57
  116. package/dist/src/checkForWindowsTerminalBugs.js +0 -101
  117. package/dist/src/commands/copy/copy.js +0 -58
  118. package/dist/src/commands/init/checkIfProjectPathExists.js +0 -53
  119. package/dist/src/commands/init/checkModSubdirectory.js +0 -41
  120. package/dist/src/commands/init/checkModTargetDirectory.js +0 -56
  121. package/dist/src/commands/init/getModsDir.js +0 -81
  122. package/dist/src/commands/init/getProjectPath.js +0 -91
  123. package/dist/src/commands/init/init.js +0 -68
  124. package/dist/src/commands/init/installVSCodeExtensions.js +0 -58
  125. package/dist/src/commands/init/promptSaveSlot.js +0 -22
  126. package/dist/src/commands/init/promptVSCode.js +0 -27
  127. package/dist/src/commands/monitor/touchWatcherSaveDatFiles.js +0 -46
  128. package/dist/src/configFile.js +0 -89
  129. package/dist/src/main.js +0 -136
  130. package/dist/src/prompt.js +0 -89
  131. package/dist/src/validateInIsaacScriptProject.js +0 -52
  132. package/isaacscript-watcher/.luacheckrc +0 -96
  133. package/isaacscript-watcher/README.md +0 -8
  134. package/isaacscript-watcher/main.lua +0 -270
  135. package/isaacscript-watcher/metadata.xml +0 -7
  136. package/isaacscript-watcher/resources/gfx/logo.anm2 +0 -27
  137. package/isaacscript-watcher/resources/gfx/logo.png +0 -0
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateInIsaacScriptProject = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const path_1 = tslib_1.__importDefault(require("path"));
7
+ const constants_1 = require("./constants");
8
+ const file = tslib_1.__importStar(require("./file"));
9
+ // Validate that we are in a directory that looks like an IsaacScript project.
10
+ function validateInIsaacScriptProject(verbose) {
11
+ const subdirectoriesToCheck = ["src", "mod", "node_modules"];
12
+ for (const subdirectoryName of subdirectoriesToCheck) {
13
+ const subdirectoryPath = path_1.default.join(constants_1.CWD, subdirectoryName);
14
+ if (!file.exists(subdirectoryPath, verbose) ||
15
+ !file.isDir(subdirectoryPath, verbose)) {
16
+ errorNotExists(subdirectoryPath);
17
+ }
18
+ }
19
+ }
20
+ exports.validateInIsaacScriptProject = validateInIsaacScriptProject;
21
+ function errorNotExists(dirName) {
22
+ console.error(chalk_1.default.red(`It looks like the current working directory is not an ${constants_1.PROJECT_NAME} project. (There is no "${dirName}" subdirectory here.)`));
23
+ console.error(`Did you mean to create a new ${constants_1.PROJECT_NAME} project with "${chalk_1.default.green("npx isaacscript init")}"?`);
24
+ console.error(`If not, then change the current working directory to an ${constants_1.PROJECT_NAME} project.`);
25
+ process.exit(1);
26
+ }
27
+ //# sourceMappingURL=validateInIsaacScriptProject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateInIsaacScriptProject.js","sourceRoot":"","sources":["../../../../packages/isaacscript-cli/src/validateInIsaacScriptProject.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,wDAAwB;AACxB,2CAAgD;AAChD,qDAA+B;AAE/B,8EAA8E;AAC9E,SAAgB,4BAA4B,CAAC,OAAgB;IAC3D,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;IAC7D,KAAK,MAAM,gBAAgB,IAAI,qBAAqB,EAAE;QACpD,MAAM,gBAAgB,GAAG,cAAI,CAAC,IAAI,CAAC,eAAG,EAAE,gBAAgB,CAAC,CAAC;QAC1D,IACE,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC;YACvC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,OAAO,CAAC,EACtC;YACA,cAAc,CAAC,gBAAgB,CAAC,CAAC;SAClC;KACF;AACH,CAAC;AAXD,oEAWC;AAED,SAAS,cAAc,CAAC,OAAe;IACrC,OAAO,CAAC,KAAK,CACX,eAAK,CAAC,GAAG,CACP,yDAAyD,wBAAY,2BAA2B,OAAO,uBAAuB,CAC/H,CACF,CAAC;IACF,OAAO,CAAC,KAAK,CACX,gCAAgC,wBAAY,kBAAkB,eAAK,CAAC,KAAK,CACvE,sBAAsB,CACvB,IAAI,CACN,CAAC;IACF,OAAO,CAAC,KAAK,CACX,2DAA2D,wBAAY,WAAW,CACnF,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This program requires Node to be at least v16.0.0, since that is the version that added the
3
+ * "fs.rmSync" function. (Node v15.0.0 is confirmed to not work.)
4
+ */
5
+ export declare function validateNodeVersion(): void;
@@ -1,27 +1,25 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.validateNodeVersion = void 0;
7
- const chalk_1 = __importDefault(require("chalk"));
8
- const constants_1 = require("./constants");
9
- const utils_1 = require("./utils");
10
- const REQUIRED_NODE_JS_MAJOR_VERSION = 16;
11
- /**
12
- * This program requires Node to be at least v16.0.0, since that is the version that added the
13
- * "fs.rmSync" function. (Node v15.0.0 is confirmed to not work.)
14
- */
15
- function validateNodeVersion() {
16
- const { version } = process;
17
- const [majorVersion] = (0, utils_1.parseSemVer)(version);
18
- if (majorVersion >= REQUIRED_NODE_JS_MAJOR_VERSION) {
19
- return;
20
- }
21
- console.error(`Your Node.js version is: ${chalk_1.default.red(version)}`);
22
- console.error(`${constants_1.PROJECT_NAME} requires a Node.js version of ${chalk_1.default.red(`${REQUIRED_NODE_JS_MAJOR_VERSION}.0.0`)} or greater.`);
23
- console.error(`Please upgrade your version of Node.js before using ${constants_1.PROJECT_NAME}.`);
24
- process.exit(1);
25
- }
26
- exports.validateNodeVersion = validateNodeVersion;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateNodeVersion = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const constants_1 = require("./constants");
7
+ const utils_1 = require("./utils");
8
+ const REQUIRED_NODE_JS_MAJOR_VERSION = 16;
9
+ /**
10
+ * This program requires Node to be at least v16.0.0, since that is the version that added the
11
+ * "fs.rmSync" function. (Node v15.0.0 is confirmed to not work.)
12
+ */
13
+ function validateNodeVersion() {
14
+ const { version } = process;
15
+ const [majorVersion] = (0, utils_1.parseSemVer)(version);
16
+ if (majorVersion >= REQUIRED_NODE_JS_MAJOR_VERSION) {
17
+ return;
18
+ }
19
+ console.error(`Your Node.js version is: ${chalk_1.default.red(version)}`);
20
+ console.error(`${constants_1.PROJECT_NAME} requires a Node.js version of ${chalk_1.default.red(`${REQUIRED_NODE_JS_MAJOR_VERSION}.0.0`)} or greater.`);
21
+ console.error(`Please upgrade your version of Node.js before using ${constants_1.PROJECT_NAME}.`);
22
+ process.exit(1);
23
+ }
24
+ exports.validateNodeVersion = validateNodeVersion;
27
25
  //# sourceMappingURL=validateNodeVersion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateNodeVersion.js","sourceRoot":"","sources":["../../../../packages/isaacscript-cli/src/validateNodeVersion.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,2CAA2C;AAC3C,mCAAsC;AAEtC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAE1C;;;GAGG;AACH,SAAgB,mBAAmB;IACjC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAE5B,MAAM,CAAC,YAAY,CAAC,GAAG,IAAA,mBAAW,EAAC,OAAO,CAAC,CAAC;IAC5C,IAAI,YAAY,IAAI,8BAA8B,EAAE;QAClD,OAAO;KACR;IAED,OAAO,CAAC,KAAK,CAAC,4BAA4B,eAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAChE,OAAO,CAAC,KAAK,CACX,GAAG,wBAAY,kCAAkC,eAAK,CAAC,GAAG,CACxD,GAAG,8BAA8B,MAAM,CACxC,cAAc,CAChB,CAAC;IACF,OAAO,CAAC,KAAK,CACX,uDAAuD,wBAAY,GAAG,CACvE,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAlBD,kDAkBC"}
@@ -0,0 +1 @@
1
+ export declare function validateOS(): void;
@@ -1,19 +1,17 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.validateOS = void 0;
7
- const chalk_1 = __importDefault(require("chalk"));
8
- const constants_1 = require("./constants");
9
- const VALID_PLATFORMS = ["win32", "linux"];
10
- function validateOS() {
11
- if (VALID_PLATFORMS.includes(process.platform)) {
12
- return;
13
- }
14
- console.error(`${constants_1.PROJECT_NAME} is only supported on ${chalk_1.default.green("Windows")} and ${chalk_1.default.green("Linux")}.`);
15
- console.error(`If you use another operating system and you want to use ${constants_1.PROJECT_NAME}, make a request in the community Discord server.`);
16
- process.exit(1);
17
- }
18
- exports.validateOS = validateOS;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateOS = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const constants_1 = require("./constants");
7
+ const VALID_PLATFORMS = ["win32", "linux"];
8
+ function validateOS() {
9
+ if (VALID_PLATFORMS.includes(process.platform)) {
10
+ return;
11
+ }
12
+ console.error(`${constants_1.PROJECT_NAME} is only supported on ${chalk_1.default.green("Windows")} and ${chalk_1.default.green("Linux")}.`);
13
+ console.error(`If you use another operating system and you want to use ${constants_1.PROJECT_NAME}, make a request in the community Discord server.`);
14
+ process.exit(1);
15
+ }
16
+ exports.validateOS = validateOS;
19
17
  //# sourceMappingURL=validateOS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateOS.js","sourceRoot":"","sources":["../../../../packages/isaacscript-cli/src/validateOS.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,2CAA2C;AAE3C,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAE3C,SAAgB,UAAU;IACxB,IAAI,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QAC9C,OAAO;KACR;IAED,OAAO,CAAC,KAAK,CACX,GAAG,wBAAY,yBAAyB,eAAK,CAAC,KAAK,CACjD,SAAS,CACV,QAAQ,eAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CACjC,CAAC;IACF,OAAO,CAAC,KAAK,CACX,2DAA2D,wBAAY,mDAAmD,CAC3H,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAdD,gCAcC"}