Skip to content

Commit a316842

Browse files
committed
remove yarn workspaces
1 parent 43653b6 commit a316842

File tree

376 files changed

+3508
-4977
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

376 files changed

+3508
-4977
lines changed
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,63 @@
1-
const aliases = require("./src/build/aliases");
2-
const aliasList = Object.entries(aliases).reduce(
3-
(arr, [key, val]) => [...arr, [key, val]],
4-
[]
5-
);
6-
7-
module.exports = {
8-
env: {
9-
browser: true,
10-
es2021: true,
11-
node: true,
12-
"jest/globals": true,
13-
},
14-
extends: [
15-
"eslint:recommended",
16-
"plugin:react/recommended",
17-
"plugin:import/recommended",
18-
"plugin:@typescript-eslint/recommended",
19-
],
20-
parser: "@typescript-eslint/parser",
21-
parserOptions: {
22-
ecmaFeatures: {
23-
jsx: true,
24-
},
25-
ecmaVersion: 12,
26-
sourceType: "module",
27-
},
28-
plugins: ["react", "jest"],
29-
rules: {
30-
"linebreak-style": ["error", "windows"],
31-
quotes: ["error", "double"],
32-
semi: ["error", "always"],
33-
"no-console": ["warn", { allow: ["error"] }],
34-
"react/display-name": 0,
35-
"react/prop-types": 0,
36-
"no-empty": ["error", { allowEmptyCatch: true }],
37-
"import/no-duplicates": 0,
38-
"no-unused-vars": "off",
39-
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
40-
"no-empty-function": "off",
41-
"@typescript-eslint/no-empty-function": "off",
42-
"@typescript-eslint/ban-ts-comment": "off",
43-
"@typescript-eslint/no-explicit-any": "off",
44-
"@typescript-eslint/no-empty-interface": "off",
45-
},
46-
globals: {
47-
__static: true,
48-
},
49-
settings: {
50-
react: {
51-
pragma: "React",
52-
fragment: "Fragment",
53-
version: "17.0.0",
54-
},
55-
"import/resolver": {
56-
alias: {
57-
map: [...aliasList, ["common", "./src/common"]],
58-
extensions: [".js", ".jsx", ".ts", ".tsx"],
59-
},
60-
},
61-
"import/ignore": [".worker.js"],
62-
},
63-
};
1+
const aliases = require("./src/build/aliases");
2+
const aliasList = Object.entries(aliases).reduce(
3+
(arr, [key, val]) => [...arr, [key, val]],
4+
[]
5+
);
6+
7+
module.exports = {
8+
env: {
9+
browser: true,
10+
es2021: true,
11+
node: true,
12+
"jest/globals": true,
13+
},
14+
extends: [
15+
"eslint:recommended",
16+
"plugin:react/recommended",
17+
"plugin:import/recommended",
18+
"plugin:@typescript-eslint/recommended",
19+
],
20+
parser: "@typescript-eslint/parser",
21+
parserOptions: {
22+
ecmaFeatures: {
23+
jsx: true,
24+
},
25+
ecmaVersion: 12,
26+
sourceType: "module",
27+
},
28+
plugins: ["react", "jest"],
29+
rules: {
30+
"linebreak-style": ["error", "windows"],
31+
quotes: ["error", "double"],
32+
semi: ["error", "always"],
33+
"no-console": ["warn", { allow: ["error"] }],
34+
"react/display-name": 0,
35+
"react/prop-types": 0,
36+
"no-empty": ["error", { allowEmptyCatch: true }],
37+
"import/no-duplicates": 0,
38+
"no-unused-vars": "off",
39+
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
40+
"no-empty-function": "off",
41+
"@typescript-eslint/no-empty-function": "off",
42+
"@typescript-eslint/ban-ts-comment": "off",
43+
"@typescript-eslint/no-explicit-any": "off",
44+
"@typescript-eslint/no-empty-interface": "off",
45+
},
46+
globals: {
47+
__static: true,
48+
},
49+
settings: {
50+
react: {
51+
pragma: "React",
52+
fragment: "Fragment",
53+
version: "17.0.0",
54+
},
55+
"import/resolver": {
56+
alias: {
57+
map: [...aliasList, ["common", "./src/common"]],
58+
extensions: [".js", ".jsx", ".ts", ".tsx"],
59+
},
60+
},
61+
"import/ignore": [".worker.js"],
62+
},
63+
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

build/patches/scm-extractor.patch

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
From 2e73cb21b2c0820045d080fa984ce47f5fc64339 Mon Sep 17 00:00:00 2001
2+
From: Markus Heikkinen <[email protected]>
3+
Date: Thu, 11 Nov 2021 00:57:26 +0200
4+
Subject: [PATCH 1/2] Don't use deprecated Buffer constructor
5+
6+
---
7+
index.js | 5 ++---
8+
1 file changed, 2 insertions(+), 3 deletions(-)
9+
10+
diff --git a/index.js b/index.js
11+
index 454078d..17249f6 100644
12+
--- a/index.js
13+
+++ b/index.js
14+
@@ -88,7 +88,7 @@ class DecrypterStream extends Transform {
15+
this.buffer.append(block)
16+
17+
const dwordLength = this.buffer.length >> 2
18+
- const output = new Buffer(dwordLength * 4)
19+
+ const output = Buffer.allocUnsafe(dwordLength * 4)
20+
for (let i = 0; i < dwordLength; i++) {
21+
output.writeUInt32LE(this.decrypter.decrypt(this.buffer.readUInt32LE(i * 4)), i * 4)
22+
}
23+
@@ -568,9 +568,8 @@ class ScmExtractor extends Transform {
24+
// possibly, for the very last sector). This is never verified, however, which means map
25+
// protection schemes can compress less data. When reading it back out, Storm will always
26+
// give sectorSize bytes anyway, so we need to pad the buffer in those cases.
27+
- toPush = new Buffer(sectorSize)
28+
+ toPush = Buffer.alloc(sectorSize, 0)
29+
buf.copy(toPush)
30+
- toPush.fill(0, buf.length)
31+
}
32+
fileSizeLeft -= toPush.length
33+
this.push(toPush)
34+
35+
From 6414129d9e80e6a67ae112632e582318c9956bed Mon Sep 17 00:00:00 2001
36+
From: Markus Heikkinen <[email protected]>
37+
Date: Wed, 5 Jan 2022 18:53:01 +0200
38+
Subject: [PATCH 2/2] Discard high bits of hash table entry count and block
39+
index
40+
41+
This matches what storm ends up unintentionally doing due to
42+
multiplication overflows.
43+
---
44+
index.js | 7 +++++--
45+
1 file changed, 5 insertions(+), 2 deletions(-)
46+
47+
diff --git a/index.js b/index.js
48+
index 17249f6..a32b4dc 100644
49+
--- a/index.js
50+
+++ b/index.js
51+
@@ -323,7 +323,9 @@ class ScmExtractor extends Transform {
52+
this._error('Invalid block table offset')
53+
return
54+
}
55+
- this._header.hashTableEntries = this._buffer.readUInt32LE(24)
56+
+ // Discard high 4 bits of hashTableEntries, as C code multiplying that u32 by
57+
+ // hash table entry size (0x10) will cause them to overflow out of u32 range.
58+
+ this._header.hashTableEntries = this._buffer.readUInt32LE(24) & 0x0FFFFFFF
59+
this._header.blockTableEntries = this._buffer.readUInt32LE(28)
60+
61+
// Notes:
62+
@@ -623,7 +625,8 @@ class ScmExtractor extends Transform {
63+
const cur = this._hashTable[i]
64+
if (cur.hashA === CHK_NAME_A && cur.hashB === CHK_NAME_B &&
65+
cur.langPlatform === CHK_LANG_PLATFORM) {
66+
- index = cur.blockIndex
67+
+ // Mask out high bits that will overflow out when doing uint32 multiplication by 0x10
68+
+ index = cur.blockIndex & 0x0FFFFFFF
69+
}
70+
}
71+
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/titan-reactor/bundled/plugins-runtime/runtime.jsx bundled/plugins-runtime/runtime.jsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useState } from "react";
1+
import React from "react";
22
import ReactDOM from "react-dom";
33
import create from "zustand";
44
import App from "./runtime/app.jsx";
@@ -37,7 +37,6 @@ const _addPlugin = (plugin) => {
3737
script.src = `${plugin.path}/index.jsx?plugin-id=${plugin.id}`;
3838
document.head.appendChild(script);
3939

40-
console.log(plugin);
4140
useConfig.setState({ [plugin.id]: plugin.config });
4241
};
4342

@@ -93,7 +92,7 @@ const AppWrapper = () => {
9392
};
9493

9594
/**
96-
* For plugins with iframe = "isolated".
95+
* A utility function for plugins with iframe = "isolated".
9796
* With IFrame based plugins, we need to wait for the iframe to load
9897
* in order for us to report the document content size to Titan Reactor so it can be placed optimally.
9998
*
File renamed without changes.
File renamed without changes.
File renamed without changes.

package.json

+155-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,157 @@
11
{
2-
"name": "titan-reactor-mono",
3-
"private": true,
4-
"workspaces": [
5-
"packages/*"
6-
]
2+
"name": "titan-reactor",
3+
"productName": "Titan Reactor",
4+
"version": "0.4.5",
5+
"description": "The Advanced Starcraft Broodwar Observing Tool",
6+
"main": "src/main/index.js",
7+
"scripts": {
8+
"test": "jest --watchAll",
9+
"test:once": "jest --runInBand",
10+
"test:debug": "node --inspect node_modules/jest/bin/jest --runInBand",
11+
"clear-cache": "rimraf .cache dist",
12+
"build": "electron-webpack",
13+
"dist": "yarn build && electron-builder",
14+
"dist:dir": "yarn dist -- --dir -c.compression=store -c.mac.identity=null",
15+
"dev": "electron-webpack dev",
16+
"dist:run": "yarn build && electron dist/main/main.js",
17+
"lint": "yarn eslint .",
18+
"clean-dev-win": "taskkill /f /im node.exe",
19+
"postinstall": "git apply -v --stat --directory=node_modules/scm-extractor build/patches/scm-extractor.patch"
20+
21+
},
22+
"browserslist": [
23+
"last 2 Chrome versions"
24+
],
25+
"repository": {
26+
"type": "git",
27+
"url": "git+https://github.com/imbateam-gg/titan-reactor.git"
28+
},
29+
"author": "Alex Pineda <[email protected]>",
30+
"license": "GPL-3.0",
31+
"bugs": {
32+
"url": "https://github.com/imbateam-gg/titan-reactor/issues"
33+
},
34+
"homepage": "https://github.com/imbateam-gg/titan-reactor#readme",
35+
"electronWebpack": {
36+
"commonSourceDirectory": "src/common",
37+
"staticSourceDirectory": "bundled",
38+
"title": "Titan Reactor",
39+
"main": {
40+
"sourceDirectory": "src/main"
41+
},
42+
"renderer": {
43+
"sourceDirectory": "src/renderer",
44+
"webpackConfig": "build/renderer.config.js"
45+
},
46+
"whiteListedModules": [
47+
"zustand",
48+
"leva"
49+
]
50+
},
51+
"build": {
52+
"appId": "imbateam.titan-reactor",
53+
"productName": "Titan Reactor",
54+
"mac": {
55+
"category": "The Advanced Observing App"
56+
},
57+
"extraResources": [{
58+
"from": "bundled",
59+
"to": "bundled"
60+
}]
61+
},
62+
"dependencies": {
63+
"@npmcli/package-json": "^1.0.1",
64+
"assert": "^2.0.0",
65+
"bl": "^5.0.0",
66+
"buble": "^0.20.0",
67+
"bw-casclib": "^2.0.0",
68+
"bw-chk": "^1.3.0",
69+
"byte-size": "^8.1.0",
70+
"camera-controls": "^1.33.2",
71+
"concat": "1.0.3",
72+
"d3-ease": "1.0.6",
73+
"deepmerge": "^4.2.2",
74+
"downgrade-replay": "^0.0.8",
75+
"electron-devtools-installer": "^3.2.0",
76+
"electron-is-dev": "^1.2.0",
77+
"express": "^4.17.3",
78+
"iconv-lite": "0.6.3",
79+
"leva": "^0.9.23",
80+
"libnpmsearch": "^5.0.0",
81+
"lodash.debounce": "^4.0.8",
82+
"lodash.get": "^4.4.2",
83+
"lodash.groupby": "^4.6.0",
84+
"lodash.shuffle": "^4.2.0",
85+
"mkdirp": "^1.0.4",
86+
"muicss": "^0.10.3",
87+
"pacote": "^13.0.3",
88+
"postprocessing": "6.24.0",
89+
"react": "^17.0.2",
90+
"react-dom": "^17.0.2",
91+
"react-jsx-parser": "^1.29.0",
92+
"react-markdown": "^8.0.0",
93+
"remark-gfm": "^3.0.1",
94+
"sanitize-filename": "^1.6.3",
95+
"scm-extractor": "^1.0.6",
96+
"semver": "^7.3.5",
97+
"three": "0.137.0",
98+
"webpack": "4.42.1",
99+
"winreg": "^1.2.4",
100+
"zustand": "3.3.3"
101+
},
102+
"devDependencies": {
103+
"@babel/core": "^7.11.6",
104+
"@babel/eslint-parser": "^7.15.8",
105+
"@babel/plugin-proposal-class-properties": "^7.10.4",
106+
"@babel/preset-env": "^7.11.5",
107+
"@babel/preset-react": "^7.14.5",
108+
"@babel/preset-typescript": "^7.15.0",
109+
"@types/bl": "^5.0.2",
110+
"@types/buble": "^0.20.1",
111+
"@types/concat-stream": "^1.6.1",
112+
"@types/d3-ease": "^3.0.0",
113+
"@types/dompurify": "^2.3.3",
114+
"@types/express": "^4.17.13",
115+
"@types/jest": "^27.0.3",
116+
"@types/js-yaml": "^4.0.5",
117+
"@types/libnpmsearch": "^2.0.3",
118+
"@types/lodash.debounce": "^4.0.6",
119+
"@types/lodash.get": "^4.4.6",
120+
"@types/lodash.groupby": "^4.6.6",
121+
"@types/lodash.shuffle": "^4.2.6",
122+
"@types/mkdirp": "^1.0.2",
123+
"@types/muicss": "^0.9.4",
124+
"@types/pacote": "^11.1.3",
125+
"@types/react": "^17.0.37",
126+
"@types/react-dom": "^17.0.11",
127+
"@types/semver": "^7.3.9",
128+
"@types/three": "^0.133.1",
129+
"@typescript-eslint/eslint-plugin": "^5.1.0",
130+
"@typescript-eslint/parser": "^5.1.0",
131+
"babel-jest": "^26.3.0",
132+
"babel-loader": "^8.2.2",
133+
"benny": "^3.7.1",
134+
"dotenv": "^8.2.0",
135+
"electron": "15.1.1",
136+
"electron-builder": "^22.8.1",
137+
"electron-webpack": "^2.8.2",
138+
"electron-webpack-ts": "^4.0.1",
139+
"eslint": "^7.16.0",
140+
"eslint-config-airbnb": "^18.2.1",
141+
"eslint-import-resolver-alias": "^1.1.2",
142+
"eslint-plugin-import": "^2.25.2",
143+
"eslint-plugin-jest": "^25.2.2",
144+
"eslint-plugin-jsx-a11y": "^6.4.1",
145+
"eslint-plugin-react": "^7.21.5",
146+
"eslint-plugin-react-hooks": "^4.2.0",
147+
"glslify-loader": "^2.0.0",
148+
"jest": "^27.2.4",
149+
"prettier": "^2.4.1",
150+
"raw-loader": "^4.0.2",
151+
"reflect-metadata": "^0.1.13",
152+
"rimraf": "^3.0.2",
153+
"source-map-support": "^0.5.19",
154+
"typescript": "^4.4.4",
155+
"worker-loader": "^2.0.0"
156+
}
7157
}

packages/downgrade-replay

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
D:/dev/downgrade-replay

0 commit comments

Comments
 (0)