isaacscript 1.1.74-dev.2 → 1.2.2
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/package.json +4 -4
- package/dist/src/commands/copy/copy.js +1 -2
- package/dist/src/commands/copy/copy.js.map +1 -1
- package/dist/src/commands/monitor/modDirectorySyncer/modDirectorySyncer.js +4 -4
- package/dist/src/commands/monitor/modDirectorySyncer/modDirectorySyncer.js.map +1 -1
- package/dist/src/monkeyPatch.js +4 -10
- package/dist/src/monkeyPatch.js.map +1 -1
- package/package.json +4 -4
- package/publish.sh +1 -1
- package/src/commands/copy/copy.ts +1 -2
- package/src/commands/monitor/modDirectorySyncer/modDirectorySyncer.ts +3 -3
- package/src/monkeyPatch.ts +4 -11
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "A command line tool for managing Isaac mods written in TypeScript",
|
|
5
5
|
"homepage": "https://isaacscript.github.io/",
|
|
6
6
|
"bugs": {
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
"isaacscript": "./dist/src/main.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@zamiell/typescript-to-lua": "^1.4.0",
|
|
19
20
|
"chalk": "4.1.2",
|
|
20
21
|
"command-exists": "^1.2.9",
|
|
21
|
-
"dotenv": "^
|
|
22
|
+
"dotenv": "^16.0.0",
|
|
22
23
|
"figlet": "^1.5.2",
|
|
23
24
|
"fs-extra": "^10.0.0",
|
|
24
25
|
"isaacscript-tsconfig": "^1.1.8",
|
|
@@ -30,7 +31,6 @@
|
|
|
30
31
|
"source-map-support": "^0.5.21",
|
|
31
32
|
"sync-directory": "^4.0.12",
|
|
32
33
|
"typescript": "^4.5.5",
|
|
33
|
-
"@zamiell/typescript-to-lua": "^1.3.6",
|
|
34
34
|
"update-notifier": "^5.1.0",
|
|
35
35
|
"yaml": "^1.10.2",
|
|
36
36
|
"yargs": "^17.3.1"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/command-exists": "^1.2.0",
|
|
40
40
|
"@types/figlet": "^1.5.4",
|
|
41
41
|
"@types/fs-extra": "^9.0.13",
|
|
42
|
-
"@types/node": "^17.0.
|
|
42
|
+
"@types/node": "^17.0.16",
|
|
43
43
|
"@types/prompt": "^1.1.2",
|
|
44
44
|
"@types/source-map-support": "^0.5.4",
|
|
45
45
|
"@types/update-notifier": "^5.1.0",
|
|
@@ -26,7 +26,6 @@ exports.compileAndCopy = exports.copy = void 0;
|
|
|
26
26
|
const path_1 = __importDefault(require("path"));
|
|
27
27
|
const constants_1 = require("../../constants");
|
|
28
28
|
const file = __importStar(require("../../file"));
|
|
29
|
-
const monkeyPatch_1 = require("../../monkeyPatch");
|
|
30
29
|
const util_1 = require("../../util");
|
|
31
30
|
function copy(config) {
|
|
32
31
|
const modTargetDirectoryName = (0, util_1.getModTargetDirectoryName)(config);
|
|
@@ -36,7 +35,7 @@ function copy(config) {
|
|
|
36
35
|
exports.copy = copy;
|
|
37
36
|
function compileAndCopy(modSourcePath, modTargetPath) {
|
|
38
37
|
compile();
|
|
39
|
-
|
|
38
|
+
// monkeyPatchMainLua(modSourcePath);
|
|
40
39
|
copyMod(modSourcePath, modTargetPath);
|
|
41
40
|
}
|
|
42
41
|
exports.compileAndCopy = compileAndCopy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../../../src/commands/copy/copy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,+CAAkD;AAClD,iDAAmC;
|
|
1
|
+
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../../../src/commands/copy/copy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,+CAAkD;AAClD,iDAAmC;AAEnC,qCAAkE;AAElE,SAAgB,IAAI,CAAC,MAAc;IACjC,MAAM,sBAAsB,GAAG,IAAA,gCAAyB,EAAC,MAAM,CAAC,CAAC;IACjE,MAAM,aAAa,GAAG,cAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,sBAAsB,CAAC,CAAC;IAC9E,cAAc,CAAC,2BAAe,EAAE,aAAa,CAAC,CAAC;AACjD,CAAC;AAJD,oBAIC;AAED,SAAgB,cAAc,CAC5B,aAAqB,EACrB,aAAqB;IAErB,OAAO,EAAE,CAAC;IACV,qCAAqC;IACrC,OAAO,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;AACxC,CAAC;AAPD,wCAOC;AAED,SAAS,OAAO;IACd,IAAA,gBAAS,EAAC,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3B,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,OAAO,CAAC,aAAqB,EAAE,aAAqB;IAC3D,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;QAC9B,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC;KAC3C;IACD,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -3,10 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const path_1 = __importDefault(require("path"));
|
|
7
6
|
const sync_directory_1 = __importDefault(require("sync-directory"));
|
|
8
7
|
const constants_1 = require("../../../constants");
|
|
9
|
-
const monkeyPatch_1 = require("../../../monkeyPatch");
|
|
10
8
|
let modSourcePath;
|
|
11
9
|
let modTargetPath;
|
|
12
10
|
init();
|
|
@@ -33,9 +31,11 @@ function afterEachSync(params) {
|
|
|
33
31
|
if (params === undefined) {
|
|
34
32
|
return;
|
|
35
33
|
}
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
/*
|
|
35
|
+
if (params.relativePath === path.sep + MAIN_LUA) {
|
|
36
|
+
monkeyPatchMainLua(modTargetPath);
|
|
38
37
|
}
|
|
38
|
+
*/
|
|
39
39
|
if (params.eventType !== "init:copy") {
|
|
40
40
|
send(`${constants_1.FILE_SYNCED_MESSAGE} ${params.relativePath}`);
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modDirectorySyncer.js","sourceRoot":"","sources":["../../../../../src/commands/monitor/modDirectorySyncer/modDirectorySyncer.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"modDirectorySyncer.js","sourceRoot":"","sources":["../../../../../src/commands/monitor/modDirectorySyncer/modDirectorySyncer.ts"],"names":[],"mappings":";;;;;AAAA,oEAA2C;AAC3C,kDAAyD;AAEzD,IAAI,aAAqB,CAAC;AAC1B,IAAI,aAAqB,CAAC;AAE1B,IAAI,EAAE,CAAC;AAEP,SAAS,IAAI;IACX,MAAM,OAAO,GAAG,CAAC,CAAC;IAClB,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,GAAG,OAAO,EAAE;QACvC,MAAM,IAAI,KAAK,CACb,yEAAyE,CAC1E,CAAC;KACH;IAED,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAChC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEhC,IAAA,wBAAa,EAAC,aAAa,EAAE,aAAa,EAAE;QAC1C,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,MAAM;QACZ,aAAa;QACb,OAAO;QACP,oBAAoB,EAAE;YACpB,gBAAgB,EAAE;gBAChB,kBAAkB,EAAE,IAAI;aACzB;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAS,aAAa,CAAC,MAMtB;IACC,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO;KACR;IAED;;;;MAIE;IAEF,IAAI,MAAM,CAAC,SAAS,KAAK,WAAW,EAAE;QACpC,IAAI,CAAC,GAAG,+BAAmB,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;KACvD;AACH,CAAC;AAED,SAAS,OAAO,CAAC,GAAU;IACzB,OAAO,CAAC,KAAK,CAAC,4CAA4C,EAAE,GAAG,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,IAAI,CAAC,GAAW;IACvB,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE;QACtC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACnB;AACH,CAAC"}
|
package/dist/src/monkeyPatch.js
CHANGED
|
@@ -43,24 +43,18 @@ see the official website: https://isaacscript.github.io/
|
|
|
43
43
|
|
|
44
44
|
`;
|
|
45
45
|
const MAIN_LUA_REPLACEMENTS = [
|
|
46
|
-
// For TSTL v1.2.X
|
|
46
|
+
// For TSTL v1.2.X-v1.3.3
|
|
47
|
+
// (fixed with GlassBrick's PR)
|
|
47
48
|
["WeakMap = __TS__Class()", "WeakMap = WeakMap or __TS__Class()"],
|
|
48
49
|
["WeakSet = __TS__Class()", "WeakSet = WeakSet or __TS__Class()"],
|
|
49
50
|
["Map = __TS__Class()", "Map = Map or __TS__Class()"],
|
|
50
51
|
["Set = __TS__Class()", "Set = Set or __TS__Class()"],
|
|
51
|
-
// For TSTL v1.1.1
|
|
52
|
-
/*
|
|
53
|
-
["WeakMap = (function", "WeakMap = WeakMap or (function"],
|
|
54
|
-
["WeakSet = (function", "WeakSet = WeakSet or (function"],
|
|
55
|
-
["Map = (function", "Map = Map or (function"],
|
|
56
|
-
["Set = (function", "Set = Set or (function"],
|
|
57
|
-
*/
|
|
58
52
|
];
|
|
59
53
|
function monkeyPatchMainLua(targetModDirectory) {
|
|
60
54
|
const mainLuaPath = path_1.default.join(targetModDirectory, constants_1.MAIN_LUA);
|
|
61
|
-
|
|
55
|
+
const mainLua = file.read(mainLuaPath);
|
|
62
56
|
// mainLua = patchInformationalHeader(mainLua);
|
|
63
|
-
mainLua = patchGlobalObjects(mainLua);
|
|
57
|
+
// mainLua = patchGlobalObjects(mainLua);
|
|
64
58
|
file.write(mainLuaPath, mainLua);
|
|
65
59
|
}
|
|
66
60
|
exports.monkeyPatchMainLua = monkeyPatchMainLua;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monkeyPatch.js","sourceRoot":"","sources":["../../src/monkeyPatch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,2CAAuC;AACvC,6CAA+B;AAE/B,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;CAe5B,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,
|
|
1
|
+
{"version":3,"file":"monkeyPatch.js","sourceRoot":"","sources":["../../src/monkeyPatch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,2CAAuC;AACvC,6CAA+B;AAE/B,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;CAe5B,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,yBAAyB;IACzB,+BAA+B;IAC/B,CAAC,yBAAyB,EAAE,oCAAoC,CAAC;IACjE,CAAC,yBAAyB,EAAE,oCAAoC,CAAC;IACjE,CAAC,qBAAqB,EAAE,4BAA4B,CAAC;IACrD,CAAC,qBAAqB,EAAE,4BAA4B,CAAC;CACtD,CAAC;AAEF,SAAgB,kBAAkB,CAAC,kBAA0B;IAC3D,MAAM,WAAW,GAAG,cAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,oBAAQ,CAAC,CAAC;IAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAEvC,+CAA+C;IAC/C,yCAAyC;IAEzC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AACnC,CAAC;AARD,gDAQC;AAED,kFAAkF;AAClF,6DAA6D;AAC7D,SAAS,wBAAwB,CAAC,OAAe;IAC/C,OAAO,oBAAoB,GAAG,OAAO,CAAC;AACxC,CAAC;AAED,2EAA2E;AAC3E,mFAAmF;AACnF,oDAAoD;AACpD,kGAAkG;AAClG,6BAA6B;AAC7B,SAAS,kBAAkB,CAAC,eAAuB;IACjD,IAAI,OAAO,GAAG,eAAe,CAAC;IAE9B,KAAK,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,IAAI,qBAAqB,EAAE;QAC/D,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;KACtD;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "A command line tool for managing Isaac mods written in TypeScript",
|
|
5
5
|
"homepage": "https://isaacscript.github.io/",
|
|
6
6
|
"bugs": {
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
"isaacscript": "./dist/src/main.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@zamiell/typescript-to-lua": "^1.4.0",
|
|
19
20
|
"chalk": "4.1.2",
|
|
20
21
|
"command-exists": "^1.2.9",
|
|
21
|
-
"dotenv": "^
|
|
22
|
+
"dotenv": "^16.0.0",
|
|
22
23
|
"figlet": "^1.5.2",
|
|
23
24
|
"fs-extra": "^10.0.0",
|
|
24
25
|
"isaacscript-tsconfig": "^1.1.8",
|
|
@@ -30,7 +31,6 @@
|
|
|
30
31
|
"source-map-support": "^0.5.21",
|
|
31
32
|
"sync-directory": "^4.0.12",
|
|
32
33
|
"typescript": "^4.5.5",
|
|
33
|
-
"@zamiell/typescript-to-lua": "^1.3.6",
|
|
34
34
|
"update-notifier": "^5.1.0",
|
|
35
35
|
"yaml": "^1.10.2",
|
|
36
36
|
"yargs": "^17.3.1"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/command-exists": "^1.2.0",
|
|
40
40
|
"@types/figlet": "^1.5.4",
|
|
41
41
|
"@types/fs-extra": "^9.0.13",
|
|
42
|
-
"@types/node": "^17.0.
|
|
42
|
+
"@types/node": "^17.0.16",
|
|
43
43
|
"@types/prompt": "^1.1.2",
|
|
44
44
|
"@types/source-map-support": "^0.5.4",
|
|
45
45
|
"@types/update-notifier": "^5.1.0",
|
package/publish.sh
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import { MOD_SOURCE_PATH } from "../../constants";
|
|
3
3
|
import * as file from "../../file";
|
|
4
|
-
import { monkeyPatchMainLua } from "../../monkeyPatch";
|
|
5
4
|
import { Config } from "../../types/Config";
|
|
6
5
|
import { execShell, getModTargetDirectoryName } from "../../util";
|
|
7
6
|
|
|
@@ -16,7 +15,7 @@ export function compileAndCopy(
|
|
|
16
15
|
modTargetPath: string,
|
|
17
16
|
): void {
|
|
18
17
|
compile();
|
|
19
|
-
monkeyPatchMainLua(modSourcePath);
|
|
18
|
+
// monkeyPatchMainLua(modSourcePath);
|
|
20
19
|
copyMod(modSourcePath, modTargetPath);
|
|
21
20
|
}
|
|
22
21
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import path from "path";
|
|
2
1
|
import syncDirectory from "sync-directory";
|
|
3
|
-
import { FILE_SYNCED_MESSAGE
|
|
4
|
-
import { monkeyPatchMainLua } from "../../../monkeyPatch";
|
|
2
|
+
import { FILE_SYNCED_MESSAGE } from "../../../constants";
|
|
5
3
|
|
|
6
4
|
let modSourcePath: string;
|
|
7
5
|
let modTargetPath: string;
|
|
@@ -43,9 +41,11 @@ function afterEachSync(params?: {
|
|
|
43
41
|
return;
|
|
44
42
|
}
|
|
45
43
|
|
|
44
|
+
/*
|
|
46
45
|
if (params.relativePath === path.sep + MAIN_LUA) {
|
|
47
46
|
monkeyPatchMainLua(modTargetPath);
|
|
48
47
|
}
|
|
48
|
+
*/
|
|
49
49
|
|
|
50
50
|
if (params.eventType !== "init:copy") {
|
|
51
51
|
send(`${FILE_SYNCED_MESSAGE} ${params.relativePath}`);
|
package/src/monkeyPatch.ts
CHANGED
|
@@ -20,27 +20,20 @@ see the official website: https://isaacscript.github.io/
|
|
|
20
20
|
`;
|
|
21
21
|
|
|
22
22
|
const MAIN_LUA_REPLACEMENTS = [
|
|
23
|
-
// For TSTL v1.2.X
|
|
23
|
+
// For TSTL v1.2.X-v1.3.3
|
|
24
|
+
// (fixed with GlassBrick's PR)
|
|
24
25
|
["WeakMap = __TS__Class()", "WeakMap = WeakMap or __TS__Class()"],
|
|
25
26
|
["WeakSet = __TS__Class()", "WeakSet = WeakSet or __TS__Class()"],
|
|
26
27
|
["Map = __TS__Class()", "Map = Map or __TS__Class()"],
|
|
27
28
|
["Set = __TS__Class()", "Set = Set or __TS__Class()"],
|
|
28
|
-
|
|
29
|
-
// For TSTL v1.1.1
|
|
30
|
-
/*
|
|
31
|
-
["WeakMap = (function", "WeakMap = WeakMap or (function"],
|
|
32
|
-
["WeakSet = (function", "WeakSet = WeakSet or (function"],
|
|
33
|
-
["Map = (function", "Map = Map or (function"],
|
|
34
|
-
["Set = (function", "Set = Set or (function"],
|
|
35
|
-
*/
|
|
36
29
|
];
|
|
37
30
|
|
|
38
31
|
export function monkeyPatchMainLua(targetModDirectory: string): void {
|
|
39
32
|
const mainLuaPath = path.join(targetModDirectory, MAIN_LUA);
|
|
40
|
-
|
|
33
|
+
const mainLua = file.read(mainLuaPath);
|
|
41
34
|
|
|
42
35
|
// mainLua = patchInformationalHeader(mainLua);
|
|
43
|
-
mainLua = patchGlobalObjects(mainLua);
|
|
36
|
+
// mainLua = patchGlobalObjects(mainLua);
|
|
44
37
|
|
|
45
38
|
file.write(mainLuaPath, mainLua);
|
|
46
39
|
}
|