isaacscript 5.2.7 → 5.2.8
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/dist/main.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import sourceMapSupport from "source-map-support";
|
|
3
|
-
import { checkForWindowsTerminalBugs } from "./checkForWindowsTerminalBugs.js";
|
|
4
3
|
import { parseArgs } from "./parseArgs.js";
|
|
5
4
|
import { promptInit } from "./prompt.js";
|
|
6
5
|
import { validateNodeVersion } from "./validateNodeVersion.js";
|
|
@@ -9,7 +8,6 @@ async function main() {
|
|
|
9
8
|
sourceMapSupport.install();
|
|
10
9
|
promptInit();
|
|
11
10
|
validateNodeVersion();
|
|
12
|
-
await checkForWindowsTerminalBugs();
|
|
13
11
|
await parseArgs();
|
|
14
12
|
}
|
|
15
13
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAEA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAEA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,IAAI,EAAE,CAAC;AAEb,KAAK,UAAU,IAAI;IACjB,gBAAgB,CAAC,OAAO,EAAE,CAAC;IAC3B,UAAU,EAAE,CAAC;IACb,mBAAmB,EAAE,CAAC;IACtB,MAAM,SAAS,EAAE,CAAC;AACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.8",
|
|
4
4
|
"description": "A command line tool for managing Isaac mods written in TypeScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"ajv": "8.17.1",
|
|
49
49
|
"chalk": "5.4.1",
|
|
50
50
|
"commander": "14.0.0",
|
|
51
|
-
"complete-common": "2.
|
|
52
|
-
"complete-node": "7.4.
|
|
51
|
+
"complete-common": "2.5.0",
|
|
52
|
+
"complete-node": "7.4.3",
|
|
53
53
|
"figlet": "1.8.2",
|
|
54
54
|
"jsonc-parser": "3.3.1",
|
|
55
55
|
"klaw-sync": "7.0.0",
|
|
56
56
|
"moment": "2.30.1",
|
|
57
57
|
"prompt": "1.3.0",
|
|
58
|
-
"source-map": "0.7.
|
|
58
|
+
"source-map": "0.7.6",
|
|
59
59
|
"source-map-support": "0.5.21",
|
|
60
60
|
"xml2js": "0.6.2",
|
|
61
61
|
"yaml": "2.8.0"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@types/source-map-support": "0.5.10",
|
|
68
68
|
"@types/xml2js": "0.4.14",
|
|
69
69
|
"ts-json-schema-generator": "2.4.0",
|
|
70
|
-
"typescript-eslint": "8.
|
|
70
|
+
"typescript-eslint": "8.38.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"typescript": ">= 5.0.0",
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import chalk from "chalk";
|
|
2
|
-
import { appendFile, isFile, readFile } from "complete-node";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { HOME_DIR, PROJECT_NAME } from "./constants.js";
|
|
5
|
-
import { getInputYesNo } from "./prompt.js";
|
|
6
|
-
const BASH_PROFILE_PATH = path.join(HOME_DIR, ".bash_profile");
|
|
7
|
-
/**
|
|
8
|
-
* By default, Git Bash for Windows uses MINGW64. This will not work correctly with the prompt
|
|
9
|
-
* library. Try to detect this and warn the end-user.
|
|
10
|
-
*/
|
|
11
|
-
export async function checkForWindowsTerminalBugs() {
|
|
12
|
-
if (process.platform === "win32" &&
|
|
13
|
-
process.env["SHELL"] === String.raw `C:\Program Files\Git\usr\bin\bash.exe`) {
|
|
14
|
-
await checkForWindowsBugColor();
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
async function checkForWindowsBugColor() {
|
|
18
|
-
if (process.env["FORCE_COLOR"] === "true") {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
console.error(chalk.red(`Error: It looks like you are using Git Bash for Windows (MINGW64) without the "${chalk.green("FORCE_COLOR")}" environment variable.`));
|
|
22
|
-
console.error("This is necessary in order for colors to work properly in the terminal.");
|
|
23
|
-
const shouldFixColors = await getInputYesNo("Do you want me to fix this for you?");
|
|
24
|
-
if (!shouldFixColors) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
applyFixesToBashProfile();
|
|
28
|
-
}
|
|
29
|
-
function applyFixesToBashProfile() {
|
|
30
|
-
// Check to see if the Bash profile has data.
|
|
31
|
-
const bashProfileContents = isFile(BASH_PROFILE_PATH)
|
|
32
|
-
? readFile(BASH_PROFILE_PATH)
|
|
33
|
-
: "";
|
|
34
|
-
const appendText = getBashProfileAppendText(bashProfileContents);
|
|
35
|
-
appendFile(BASH_PROFILE_PATH, appendText);
|
|
36
|
-
console.log(`The terminal fixes have been added to: ${chalk.green(BASH_PROFILE_PATH)}`, chalk.red("Please close and re-open your terminal, then run this program again."));
|
|
37
|
-
process.exit(0);
|
|
38
|
-
}
|
|
39
|
-
function getBashProfileAppendText(bashProfileContents) {
|
|
40
|
-
let newText = "";
|
|
41
|
-
if (bashProfileContents !== "" && !bashProfileContents.endsWith("\n")) {
|
|
42
|
-
// If the Bash profile exists and has data, it should end in a newline. Add an extra newline if
|
|
43
|
-
// this is not the case.
|
|
44
|
-
newText += "\n";
|
|
45
|
-
}
|
|
46
|
-
if (bashProfileContents !== "") {
|
|
47
|
-
// If the Bash profile exists and has data, add an extra newline between the existing stuff and
|
|
48
|
-
// the new lines added by us.
|
|
49
|
-
newText += "\n";
|
|
50
|
-
}
|
|
51
|
-
newText += `# Terminal fixes added by ${PROJECT_NAME}\n`;
|
|
52
|
-
newText += "export FORCE_COLOR=true\n";
|
|
53
|
-
return newText;
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=checkForWindowsTerminalBugs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkForWindowsTerminalBugs.js","sourceRoot":"","sources":["../src/checkForWindowsTerminalBugs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B;IAC/C,IACE,OAAO,CAAC,QAAQ,KAAK,OAAO;QAC5B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,MAAM,CAAC,GAAG,CAAA,uCAAuC,EAC1E,CAAC;QACD,MAAM,uBAAuB,EAAE,CAAC;IAClC,CAAC;AACH,CAAC;AAED,KAAK,UAAU,uBAAuB;IACpC,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,MAAM,EAAE,CAAC;QAC1C,OAAO;IACT,CAAC;IAED,OAAO,CAAC,KAAK,CACX,KAAK,CAAC,GAAG,CACP,kFAAkF,KAAK,CAAC,KAA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