isaacscript 2.0.5 → 2.0.6
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/.cspell.json +8 -36
- package/.vscode/settings.json +2 -0
- package/check-file-updates.sh +35 -25
- package/check-file-updates.txt +8 -0
- package/check-orphaned-words.sh +17 -12
- package/dist/package.json +3 -2
- package/dist/src/commands/monitor/monitor.js +4 -4
- package/file-templates/dynamic/package.json +2 -1
- package/file-templates/static/.cspell.json.template +15 -3
- package/file-templates/static/.vscode/settings.json +2 -3
- package/file-templates/static/check-orphaned-words.sh +17 -12
- package/file-templates/static-alt/.vscode/extensions-format.json +8 -0
- package/file-templates/static-alt/check-file-updates.sh +67 -0
- package/package.json +3 -2
- package/src/commands/monitor/monitor.ts +4 -4
- package/.cspell-base.json +0 -38
- package/.cspell-check-unused.json +0 -7
- package/file-templates/static/.cspell-check-unused.json +0 -9
- package/file-templates/static-alt/.cspell-base.json +0 -38
- package/file-templates/static-alt/.cspell-check-unused-base.json +0 -7
package/.cspell.json
CHANGED
|
@@ -2,52 +2,24 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
|
3
3
|
"version": "0.2",
|
|
4
4
|
"import": [
|
|
5
|
-
"
|
|
5
|
+
"isaacscript-spell/.cspell-isaacscript.json"
|
|
6
6
|
],
|
|
7
7
|
"files": [
|
|
8
8
|
"**"
|
|
9
9
|
],
|
|
10
10
|
"ignorePaths": [
|
|
11
|
+
"*.anm2",
|
|
12
|
+
"*.pyc",
|
|
13
|
+
"*.wav",
|
|
11
14
|
".git/**",
|
|
12
15
|
"dist/**",
|
|
13
|
-
"node_modules/**"
|
|
16
|
+
"node_modules/**",
|
|
17
|
+
"mod/main.lua",
|
|
18
|
+
"mod/resources/rooms/**"
|
|
14
19
|
],
|
|
15
20
|
"words": [
|
|
16
21
|
"APPDATA",
|
|
17
|
-
"contentfolder",
|
|
18
|
-
"dbaeumer",
|
|
19
|
-
"dotenv",
|
|
20
|
-
"eslintcache",
|
|
21
|
-
"isaacscript",
|
|
22
|
-
"jscoverage",
|
|
23
|
-
"jspm",
|
|
24
|
-
"lcov",
|
|
25
|
-
"luamod",
|
|
26
|
-
"Microbundle",
|
|
27
|
-
"noout",
|
|
28
22
|
"npmignore",
|
|
29
|
-
"
|
|
30
|
-
"pftempestasevencondensed",
|
|
31
|
-
"pids",
|
|
32
|
-
"pnpm",
|
|
33
|
-
"prettierignore",
|
|
34
|
-
"prettierrc",
|
|
35
|
-
"publishedfileid",
|
|
36
|
-
"sarisia",
|
|
37
|
-
"Spritesheet",
|
|
38
|
-
"Spritesheets",
|
|
39
|
-
"steamapps",
|
|
40
|
-
"steamcmd",
|
|
41
|
-
"stylelint",
|
|
42
|
-
"stylelintcache",
|
|
43
|
-
"subprocesses",
|
|
44
|
-
"sycner",
|
|
45
|
-
"syncer",
|
|
46
|
-
"technote",
|
|
47
|
-
"tstl",
|
|
48
|
-
"vuepress",
|
|
49
|
-
"workshopitem",
|
|
50
|
-
"wscript",
|
|
51
|
-
"zamiell"
|
|
23
|
+
"syncer"
|
|
52
24
|
]
|
|
53
25
|
}
|
package/.vscode/settings.json
CHANGED
package/check-file-updates.sh
CHANGED
|
@@ -1,52 +1,62 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
|
-
FILES_TO_CHECK=(
|
|
4
|
-
".vscode/extensions.json:.vscode/extensions-typescript.json"
|
|
5
|
-
".cspell-base.json:.cspell-base.json"
|
|
6
|
-
".cspell-check-unused.json:.cspell-check-unused-base.json"
|
|
7
|
-
".gitattributes"
|
|
8
|
-
".prettierrc.js"
|
|
9
|
-
".prettierignore:.prettierignore-base"
|
|
10
|
-
"tsconfig.eslint.json"
|
|
11
|
-
"check-orphaned-words.sh"
|
|
12
|
-
)
|
|
13
|
-
|
|
14
3
|
set -e # Exit on any errors
|
|
15
4
|
|
|
16
5
|
# Get the directory of this script:
|
|
17
6
|
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
18
7
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
19
8
|
|
|
9
|
+
TEMPLATE_FILES_FILE_NAME="check-file-updates.txt"
|
|
10
|
+
TEMPLATE_FILES_PATH="$DIR/$TEMPLATE_FILES_FILE_NAME"
|
|
11
|
+
|
|
12
|
+
# Do nothing if the metadata file does not exist.
|
|
13
|
+
if ! test -f "$TEMPLATE_FILES_PATH"; then
|
|
14
|
+
echo "The \"$TEMPLATE_FILES_FILE_NAME\" file does not exist. Skipping checks."
|
|
15
|
+
exit 0
|
|
16
|
+
fi
|
|
17
|
+
|
|
20
18
|
ONE_OR_MORE_FAILURES=0
|
|
21
|
-
for
|
|
22
|
-
if [[ "$
|
|
23
|
-
|
|
19
|
+
for FILE_SPECIFICATION in $(cat "$TEMPLATE_FILES_PATH"); do
|
|
20
|
+
if [[ "$FILE_SPECIFICATION" =~ (.+):(.+) ]]; then
|
|
21
|
+
LOCAL_FILE=${BASH_REMATCH[1]}
|
|
24
22
|
REMOTE_FILE=${BASH_REMATCH[2]}
|
|
25
23
|
STATIC_DIRECTORY="static-alt"
|
|
26
24
|
else
|
|
27
|
-
|
|
25
|
+
LOCAL_FILE=$FILE_SPECIFICATION
|
|
26
|
+
REMOTE_FILE=$FILE_SPECIFICATION
|
|
28
27
|
STATIC_DIRECTORY="static"
|
|
29
28
|
fi
|
|
30
29
|
|
|
31
|
-
echo "Checking for an updated version of: $
|
|
32
|
-
|
|
30
|
+
echo "Checking for an updated version of: $LOCAL_FILE"
|
|
31
|
+
TMP_FILE_PATH="/tmp/base-file"
|
|
33
32
|
URL="https://raw.githubusercontent.com/IsaacScript/isaacscript/main/file-templates/$STATIC_DIRECTORY/$REMOTE_FILE"
|
|
34
|
-
curl "$URL" --output "$
|
|
35
|
-
if grep "404: Not Found" "$
|
|
33
|
+
curl "$URL" --output "$TMP_FILE_PATH" --silent --show-error
|
|
34
|
+
if grep "^404: Not Found" "$TMP_FILE_PATH" --silent; then
|
|
35
|
+
echo
|
|
36
36
|
echo "Failed to find the following remote file:"
|
|
37
37
|
echo "$URL"
|
|
38
38
|
exit 1
|
|
39
39
|
fi
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
if
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
FILE_PATH="$DIR/$LOCAL_FILE"
|
|
42
|
+
if test -f "$FILE_PATH"; then
|
|
43
|
+
set +e
|
|
44
|
+
if ! cmp "$FILE_PATH" "$TMP_FILE_PATH" --silent; then
|
|
45
|
+
echo
|
|
46
|
+
echo "File \"$LOCAL_FILE\" is out of date. Get the updated version here:"
|
|
47
|
+
echo "$URL"
|
|
48
|
+
echo
|
|
49
|
+
diff "$FILE_PATH" "$TMP_FILE_PATH"
|
|
50
|
+
echo
|
|
51
|
+
ONE_OR_MORE_FAILURES=1
|
|
52
|
+
fi
|
|
53
|
+
set -e
|
|
54
|
+
else
|
|
55
|
+
echo "File \"$FILE_PATH\" does not exist! Change the \"$TEMPLATE_FILES_FILE_NAME\" file."
|
|
45
56
|
ONE_OR_MORE_FAILURES=1
|
|
46
57
|
fi
|
|
47
|
-
set -e
|
|
48
58
|
|
|
49
|
-
rm -f "$
|
|
59
|
+
rm -f "$TMP_FILE_PATH"
|
|
50
60
|
done
|
|
51
61
|
|
|
52
62
|
if [ $ONE_OR_MORE_FAILURES -ne "0" ]; then
|
package/check-orphaned-words.sh
CHANGED
|
@@ -10,31 +10,36 @@ REPO_ROOT="$DIR"
|
|
|
10
10
|
cd "$REPO_ROOT"
|
|
11
11
|
|
|
12
12
|
# Do nothing if the configuration file does not exist.
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
CSPELL_CONFIG_NAME=".cspell.json"
|
|
14
|
+
CSPELL_CONFIG_PATH="$REPO_ROOT/$CSPELL_CONFIG_NAME"
|
|
15
|
+
if ! test -f "$CSPELL_CONFIG_PATH"; then
|
|
16
|
+
echo "The \"$CSPELL_CONFIG_NAME\" file does not exist. Skipping checks."
|
|
15
17
|
exit 0
|
|
16
18
|
fi
|
|
17
19
|
|
|
18
20
|
# Do nothing if the configuration file does not have any words in it.
|
|
19
|
-
if ! grep -q '"words": ' "$
|
|
21
|
+
if ! grep -q '"words": ' "$CSPELL_CONFIG_PATH"; then
|
|
22
|
+
echo "The \"$CSPELL_CONFIG_NAME\" file does not have any whitelisted words in it. Skipping checks."
|
|
20
23
|
exit 0
|
|
21
24
|
fi
|
|
22
25
|
|
|
23
|
-
# Make a list of every misspelled word without any custom
|
|
26
|
+
# Make a list of every misspelled word without any custom words.
|
|
24
27
|
# We need to move the configuration path temporarily or else the cspell command won't work properly.
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
CSPELL_CONFIG_WORDS=$(cat "$CSPELL_CONFIG_PATH" | python -c "import sys, json; print('\n'.join(json.load(sys.stdin)['words']))")
|
|
29
|
+
CSPELL_CONFIG_WITHOUT_WORDS=$(cat "$CSPELL_CONFIG_PATH" | python -c "import sys, json; config = json.load(sys.stdin); del config['words']; print(json.dumps(config))")
|
|
30
|
+
CSPELL_CONFIG_PATH_TEMP="$REPO_ROOT/.cspell-temp.json"
|
|
31
|
+
mv "$CSPELL_CONFIG_PATH" "$CSPELL_CONFIG_PATH_TEMP"
|
|
32
|
+
echo "$CSPELL_CONFIG_WITHOUT_WORDS" > "$CSPELL_CONFIG_PATH"
|
|
27
33
|
MISSPELLED_WORDS_PATH="/tmp/misspelled-words.txt"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
mv "$CSPELL_CONFIGURATION_PATH_TEMP" "$CSPELL_CONFIGURATION_PATH"
|
|
34
|
+
npx cspell lint --no-progress --no-summary --unique --words-only | sort --ignore-case --unique > "$MISSPELLED_WORDS_PATH"
|
|
35
|
+
mv "$CSPELL_CONFIG_PATH_TEMP" "$CSPELL_CONFIG_PATH"
|
|
31
36
|
|
|
32
37
|
# Check that each ".cspell.json" word is actually being used.
|
|
33
|
-
echo "Checking for orphaned CSpell configuration words in: $
|
|
34
|
-
|
|
38
|
+
echo "Checking for orphaned CSpell configuration words in: $CSPELL_CONFIG_PATH"
|
|
39
|
+
|
|
35
40
|
ONE_OR_MORE_FAILURES=0
|
|
36
41
|
set +e
|
|
37
|
-
for LINE in $
|
|
42
|
+
for LINE in $CSPELL_CONFIG_WORDS; do
|
|
38
43
|
LINE_TRIMMED=$(echo "$LINE" | xargs)
|
|
39
44
|
if ! grep "$LINE_TRIMMED" "$MISSPELLED_WORDS_PATH" --ignore-case --quiet; then
|
|
40
45
|
echo "The following word in the CSpell config is not being used: $LINE_TRIMMED"
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "A command line tool for managing Isaac mods written in TypeScript",
|
|
5
5
|
"homepage": "https://isaacscript.github.io/",
|
|
6
6
|
"bugs": {
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@types/source-map-support": "^0.5.4",
|
|
46
46
|
"@types/update-notifier": "^5.1.0",
|
|
47
47
|
"@types/yargs": "^17.0.10",
|
|
48
|
-
"isaacscript-lint": "^1.0.141"
|
|
48
|
+
"isaacscript-lint": "^1.0.141",
|
|
49
|
+
"isaacscript-spell": "^1.0.3"
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -85,8 +85,8 @@ function spawnModDirectorySyncer(config) {
|
|
|
85
85
|
const processPath = path_1.default.join(__dirname, processName, processName);
|
|
86
86
|
const modTargetName = (0, utils_1.getModTargetDirectoryName)(config);
|
|
87
87
|
const modTargetPath = path_1.default.join(config.modsDirectory, modTargetName);
|
|
88
|
-
const
|
|
89
|
-
|
|
88
|
+
const directorySyncer = (0, child_process_1.fork)(processPath, [constants_1.MOD_SOURCE_PATH, modTargetPath]);
|
|
89
|
+
directorySyncer.on("message", (msg) => {
|
|
90
90
|
notifyGame.msg(msg);
|
|
91
91
|
// If the "main.lua" file was successfully copied over, we also have to tell isaacscript-watcher
|
|
92
92
|
// to reload the mod. Look for something like: "File synced: \main.lua"
|
|
@@ -96,10 +96,10 @@ function spawnModDirectorySyncer(config) {
|
|
|
96
96
|
notifyGame.msg("Reloaded the mod.");
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
|
|
99
|
+
directorySyncer.on("close", (code) => {
|
|
100
100
|
(0, utils_1.error)(`Error: ${processDescription} subprocess closed with code: ${code}`);
|
|
101
101
|
});
|
|
102
|
-
|
|
102
|
+
directorySyncer.on("exit", (code) => {
|
|
103
103
|
(0, utils_1.error)(`Error: ${processDescription} subprocess exited with code: ${code}`);
|
|
104
104
|
});
|
|
105
105
|
}
|
|
@@ -2,8 +2,20 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
|
3
3
|
"version": "0.2",
|
|
4
4
|
"import": [
|
|
5
|
-
"
|
|
5
|
+
"isaacscript-spell/.cspell-isaacscript.json"
|
|
6
6
|
],
|
|
7
|
-
"files": [
|
|
8
|
-
|
|
7
|
+
"files": [
|
|
8
|
+
"**"
|
|
9
|
+
],
|
|
10
|
+
"ignorePaths": [
|
|
11
|
+
"*.anm2",
|
|
12
|
+
"*.pyc",
|
|
13
|
+
"*.wav",
|
|
14
|
+
".git/**",
|
|
15
|
+
"dist/**",
|
|
16
|
+
"node_modules/**",
|
|
17
|
+
"mod/main.lua",
|
|
18
|
+
"mod/resources/rooms/**"
|
|
19
|
+
],
|
|
20
|
+
"words": []
|
|
9
21
|
}
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
// Configure glob patterns for excluding files and folders in full text searches and quick open.
|
|
23
23
|
"search.exclude": {
|
|
24
|
-
"**/mod/main.lua": true,
|
|
25
24
|
"**/*.png": true,
|
|
26
25
|
"**/*.wav": true,
|
|
27
26
|
"dist/**": true,
|
|
@@ -63,12 +62,12 @@
|
|
|
63
62
|
"editor.formatOnSave": true,
|
|
64
63
|
"editor.tabSize": 2,
|
|
65
64
|
},
|
|
66
|
-
"[
|
|
65
|
+
"[xml]": {
|
|
67
66
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
68
67
|
"editor.formatOnSave": true,
|
|
69
68
|
"editor.tabSize": 2,
|
|
70
69
|
},
|
|
71
|
-
"[
|
|
70
|
+
"[markdown]": {
|
|
72
71
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
73
72
|
"editor.formatOnSave": true,
|
|
74
73
|
"editor.tabSize": 2,
|
|
@@ -10,31 +10,36 @@ REPO_ROOT="$DIR"
|
|
|
10
10
|
cd "$REPO_ROOT"
|
|
11
11
|
|
|
12
12
|
# Do nothing if the configuration file does not exist.
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
CSPELL_CONFIG_NAME=".cspell.json"
|
|
14
|
+
CSPELL_CONFIG_PATH="$REPO_ROOT/$CSPELL_CONFIG_NAME"
|
|
15
|
+
if ! test -f "$CSPELL_CONFIG_PATH"; then
|
|
16
|
+
echo "The \"$CSPELL_CONFIG_NAME\" file does not exist. Skipping checks."
|
|
15
17
|
exit 0
|
|
16
18
|
fi
|
|
17
19
|
|
|
18
20
|
# Do nothing if the configuration file does not have any words in it.
|
|
19
|
-
if ! grep -q '"words": ' "$
|
|
21
|
+
if ! grep -q '"words": ' "$CSPELL_CONFIG_PATH"; then
|
|
22
|
+
echo "The \"$CSPELL_CONFIG_NAME\" file does not have any whitelisted words in it. Skipping checks."
|
|
20
23
|
exit 0
|
|
21
24
|
fi
|
|
22
25
|
|
|
23
|
-
# Make a list of every misspelled word without any custom
|
|
26
|
+
# Make a list of every misspelled word without any custom words.
|
|
24
27
|
# We need to move the configuration path temporarily or else the cspell command won't work properly.
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
CSPELL_CONFIG_WORDS=$(cat "$CSPELL_CONFIG_PATH" | python -c "import sys, json; print('\n'.join(json.load(sys.stdin)['words']))")
|
|
29
|
+
CSPELL_CONFIG_WITHOUT_WORDS=$(cat "$CSPELL_CONFIG_PATH" | python -c "import sys, json; config = json.load(sys.stdin); del config['words']; print(json.dumps(config))")
|
|
30
|
+
CSPELL_CONFIG_PATH_TEMP="$REPO_ROOT/.cspell-temp.json"
|
|
31
|
+
mv "$CSPELL_CONFIG_PATH" "$CSPELL_CONFIG_PATH_TEMP"
|
|
32
|
+
echo "$CSPELL_CONFIG_WITHOUT_WORDS" > "$CSPELL_CONFIG_PATH"
|
|
27
33
|
MISSPELLED_WORDS_PATH="/tmp/misspelled-words.txt"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
mv "$CSPELL_CONFIGURATION_PATH_TEMP" "$CSPELL_CONFIGURATION_PATH"
|
|
34
|
+
npx cspell lint --no-progress --no-summary --unique --words-only | sort --ignore-case --unique > "$MISSPELLED_WORDS_PATH"
|
|
35
|
+
mv "$CSPELL_CONFIG_PATH_TEMP" "$CSPELL_CONFIG_PATH"
|
|
31
36
|
|
|
32
37
|
# Check that each ".cspell.json" word is actually being used.
|
|
33
|
-
echo "Checking for orphaned CSpell configuration words in: $
|
|
34
|
-
|
|
38
|
+
echo "Checking for orphaned CSpell configuration words in: $CSPELL_CONFIG_PATH"
|
|
39
|
+
|
|
35
40
|
ONE_OR_MORE_FAILURES=0
|
|
36
41
|
set +e
|
|
37
|
-
for LINE in $
|
|
42
|
+
for LINE in $CSPELL_CONFIG_WORDS; do
|
|
38
43
|
LINE_TRIMMED=$(echo "$LINE" | xargs)
|
|
39
44
|
if ! grep "$LINE_TRIMMED" "$MISSPELLED_WORDS_PATH" --ignore-case --quiet; then
|
|
40
45
|
echo "The following word in the CSpell config is not being used: $LINE_TRIMMED"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// These are Visual Studio Code extensions that are intended to be used with this particular
|
|
2
|
+
// repository: https://go.microsoft.com/fwlink/?LinkId=827846
|
|
3
|
+
{
|
|
4
|
+
"recommendations": [
|
|
5
|
+
"esbenp.prettier-vscode", // The TypeScript formatter
|
|
6
|
+
"streetsidesoftware.code-spell-checker", // A spell-checker extension based on cspell
|
|
7
|
+
],
|
|
8
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e # Exit on any errors
|
|
4
|
+
|
|
5
|
+
# Get the directory of this script:
|
|
6
|
+
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
7
|
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
8
|
+
|
|
9
|
+
TEMPLATE_FILES_FILE_NAME="check-file-updates.txt"
|
|
10
|
+
TEMPLATE_FILES_PATH="$DIR/$TEMPLATE_FILES_FILE_NAME"
|
|
11
|
+
|
|
12
|
+
# Do nothing if the metadata file does not exist.
|
|
13
|
+
if ! test -f "$TEMPLATE_FILES_PATH"; then
|
|
14
|
+
echo "The \"$TEMPLATE_FILES_FILE_NAME\" file does not exist. Skipping checks."
|
|
15
|
+
exit 0
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
ONE_OR_MORE_FAILURES=0
|
|
19
|
+
for FILE_SPECIFICATION in $(cat "$TEMPLATE_FILES_PATH"); do
|
|
20
|
+
if [[ "$FILE_SPECIFICATION" =~ (.+):(.+) ]]; then
|
|
21
|
+
LOCAL_FILE=${BASH_REMATCH[1]}
|
|
22
|
+
REMOTE_FILE=${BASH_REMATCH[2]}
|
|
23
|
+
STATIC_DIRECTORY="static-alt"
|
|
24
|
+
else
|
|
25
|
+
LOCAL_FILE=$FILE_SPECIFICATION
|
|
26
|
+
REMOTE_FILE=$FILE_SPECIFICATION
|
|
27
|
+
STATIC_DIRECTORY="static"
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
echo "Checking for an updated version of: $LOCAL_FILE"
|
|
31
|
+
TMP_FILE_PATH="/tmp/base-file"
|
|
32
|
+
URL="https://raw.githubusercontent.com/IsaacScript/isaacscript/main/file-templates/$STATIC_DIRECTORY/$REMOTE_FILE"
|
|
33
|
+
curl "$URL" --output "$TMP_FILE_PATH" --silent --show-error
|
|
34
|
+
if grep "^404: Not Found" "$TMP_FILE_PATH" --silent; then
|
|
35
|
+
echo
|
|
36
|
+
echo "Failed to find the following remote file:"
|
|
37
|
+
echo "$URL"
|
|
38
|
+
exit 1
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
FILE_PATH="$DIR/$LOCAL_FILE"
|
|
42
|
+
if test -f "$FILE_PATH"; then
|
|
43
|
+
set +e
|
|
44
|
+
if ! cmp "$FILE_PATH" "$TMP_FILE_PATH" --silent; then
|
|
45
|
+
echo
|
|
46
|
+
echo "File \"$LOCAL_FILE\" is out of date. Get the updated version here:"
|
|
47
|
+
echo "$URL"
|
|
48
|
+
echo
|
|
49
|
+
diff "$FILE_PATH" "$TMP_FILE_PATH"
|
|
50
|
+
echo
|
|
51
|
+
ONE_OR_MORE_FAILURES=1
|
|
52
|
+
fi
|
|
53
|
+
set -e
|
|
54
|
+
else
|
|
55
|
+
echo "File \"$FILE_PATH\" does not exist! Change the \"$TEMPLATE_FILES_FILE_NAME\" file."
|
|
56
|
+
ONE_OR_MORE_FAILURES=1
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
rm -f "$TMP_FILE_PATH"
|
|
60
|
+
done
|
|
61
|
+
|
|
62
|
+
if [ $ONE_OR_MORE_FAILURES -ne "0" ]; then
|
|
63
|
+
echo "One or more files was not valid."
|
|
64
|
+
exit 1
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
echo "All core files up to date!"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "A command line tool for managing Isaac mods written in TypeScript",
|
|
5
5
|
"homepage": "https://isaacscript.github.io/",
|
|
6
6
|
"bugs": {
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@types/source-map-support": "^0.5.4",
|
|
46
46
|
"@types/update-notifier": "^5.1.0",
|
|
47
47
|
"@types/yargs": "^17.0.10",
|
|
48
|
-
"isaacscript-lint": "^1.0.141"
|
|
48
|
+
"isaacscript-lint": "^1.0.141",
|
|
49
|
+
"isaacscript-spell": "^1.0.3"
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -76,9 +76,9 @@ function spawnModDirectorySyncer(config: Config) {
|
|
|
76
76
|
const processPath = path.join(__dirname, processName, processName);
|
|
77
77
|
const modTargetName = getModTargetDirectoryName(config);
|
|
78
78
|
const modTargetPath = path.join(config.modsDirectory, modTargetName);
|
|
79
|
-
const
|
|
79
|
+
const directorySyncer = fork(processPath, [MOD_SOURCE_PATH, modTargetPath]);
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
directorySyncer.on("message", (msg: string) => {
|
|
82
82
|
notifyGame.msg(msg);
|
|
83
83
|
|
|
84
84
|
// If the "main.lua" file was successfully copied over, we also have to tell isaacscript-watcher
|
|
@@ -90,11 +90,11 @@ function spawnModDirectorySyncer(config: Config) {
|
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
directorySyncer.on("close", (code: number | null) => {
|
|
94
94
|
error(`Error: ${processDescription} subprocess closed with code: ${code}`);
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
directorySyncer.on("exit", (code: number | null) => {
|
|
98
98
|
error(`Error: ${processDescription} subprocess exited with code: ${code}`);
|
|
99
99
|
});
|
|
100
100
|
}
|
package/.cspell-base.json
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
|
3
|
-
"version": "0.2",
|
|
4
|
-
"loadDefaultConfiguration": true,
|
|
5
|
-
"import": [
|
|
6
|
-
"@cspell/dict-companies/cspell-ext.json",
|
|
7
|
-
"@cspell/dict-en_us/cspell-ext.json",
|
|
8
|
-
"@cspell/dict-public-licenses/cspell-ext.json",
|
|
9
|
-
"@cspell/dict-software-terms/cspell-ext.json",
|
|
10
|
-
"@cspell/dict-typescript/cspell-ext.json"
|
|
11
|
-
],
|
|
12
|
-
"dictionaries": [
|
|
13
|
-
"companies",
|
|
14
|
-
"en_US",
|
|
15
|
-
"networking-terms",
|
|
16
|
-
"public-licenses",
|
|
17
|
-
"software-terms",
|
|
18
|
-
"typescript"
|
|
19
|
-
],
|
|
20
|
-
"ignoreRegExpList": [
|
|
21
|
-
"Base64MultiLine",
|
|
22
|
-
"Base64SingleLine",
|
|
23
|
-
"CommitHash",
|
|
24
|
-
"CommitHashLink",
|
|
25
|
-
"CSSHexValue",
|
|
26
|
-
"CStyleHexValue",
|
|
27
|
-
"Email",
|
|
28
|
-
"HashStrings",
|
|
29
|
-
"RsaCert",
|
|
30
|
-
"SHA",
|
|
31
|
-
"SpellCheckerDisable",
|
|
32
|
-
"SpellCheckerIgnoreInDocSetting",
|
|
33
|
-
"SshRsa",
|
|
34
|
-
"UnicodeRef",
|
|
35
|
-
"Urls",
|
|
36
|
-
"UUID"
|
|
37
|
-
]
|
|
38
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
|
3
|
-
"version": "0.2",
|
|
4
|
-
"import": [
|
|
5
|
-
"./node_modules/isaac-typescript-definitions/.cspell-isaacscript.json"
|
|
6
|
-
],
|
|
7
|
-
"files": ["**"],
|
|
8
|
-
"ignorePaths": [".cspell-temp.json", ".git/**", "dist/**", "node_modules/**"]
|
|
9
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
|
3
|
-
"version": "0.2",
|
|
4
|
-
"loadDefaultConfiguration": true,
|
|
5
|
-
"import": [
|
|
6
|
-
"@cspell/dict-companies/cspell-ext.json",
|
|
7
|
-
"@cspell/dict-en_us/cspell-ext.json",
|
|
8
|
-
"@cspell/dict-public-licenses/cspell-ext.json",
|
|
9
|
-
"@cspell/dict-software-terms/cspell-ext.json",
|
|
10
|
-
"@cspell/dict-typescript/cspell-ext.json"
|
|
11
|
-
],
|
|
12
|
-
"dictionaries": [
|
|
13
|
-
"companies",
|
|
14
|
-
"en_US",
|
|
15
|
-
"networking-terms",
|
|
16
|
-
"public-licenses",
|
|
17
|
-
"software-terms",
|
|
18
|
-
"typescript"
|
|
19
|
-
],
|
|
20
|
-
"ignoreRegExpList": [
|
|
21
|
-
"Base64MultiLine",
|
|
22
|
-
"Base64SingleLine",
|
|
23
|
-
"CommitHash",
|
|
24
|
-
"CommitHashLink",
|
|
25
|
-
"CSSHexValue",
|
|
26
|
-
"CStyleHexValue",
|
|
27
|
-
"Email",
|
|
28
|
-
"HashStrings",
|
|
29
|
-
"RsaCert",
|
|
30
|
-
"SHA",
|
|
31
|
-
"SpellCheckerDisable",
|
|
32
|
-
"SpellCheckerIgnoreInDocSetting",
|
|
33
|
-
"SshRsa",
|
|
34
|
-
"UnicodeRef",
|
|
35
|
-
"Urls",
|
|
36
|
-
"UUID"
|
|
37
|
-
]
|
|
38
|
-
}
|