@kitten-science/kitten-scientists 2.0.0-beta.11-20250513-2dba8bf → 2.0.0-beta.11-dev-120a52b
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/lib/devcontainer/inject-scripts.js +3 -4
- package/lib/devcontainer/inject-scripts.js.map +1 -1
- package/lib/devcontainer/rewrite-index.js +3 -2
- package/lib/devcontainer/rewrite-index.js.map +1 -1
- package/output/devcontainer/inject-scripts.mjs +2 -6
- package/output/devcontainer/rewrite-index.mjs +1 -1
- package/package.json +4 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
const indexHtml = readFileSync("index.html", "utf8");
|
|
4
|
-
const injectables =
|
|
5
|
-
|
|
4
|
+
const injectables = readdirSync("overlay").map(_ => _.endsWith(".inject.js"));
|
|
5
|
+
const injectedHtml = indexHtml.replace("</body>", `<script>
|
|
6
6
|
const scripts = ${JSON.stringify(injectables)};
|
|
7
7
|
for (const subject of scripts) {
|
|
8
8
|
const script = document.createElement("script");
|
|
@@ -10,6 +10,5 @@ let injectedHtml = indexHtml.replace("</body>", `<script>
|
|
|
10
10
|
document.body.appendChild(script);
|
|
11
11
|
}
|
|
12
12
|
</script></body>`);
|
|
13
|
-
injectedHtml = injectedHtml.replace(/<title>.+<\/title>/, "<title>☣ Kitten Scientists Development Environment</title>");
|
|
14
13
|
writeFileSync("index.html", injectedHtml);
|
|
15
14
|
//# sourceMappingURL=inject-scripts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject-scripts.js","sourceRoot":"","sources":["../../source/devcontainer/inject-scripts.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"inject-scripts.js","sourceRoot":"","sources":["../../source/devcontainer/inject-scripts.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEnE,MAAM,SAAS,GAAG,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AACrD,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC;AAC9E,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CACpC,SAAS,EACT;sBACoB,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;;;;;;mBAM9B,CAClB,CAAC;AACF,aAAa,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC"}
|
|
@@ -9,14 +9,15 @@ const main = async () => {
|
|
|
9
9
|
// Google stuff
|
|
10
10
|
$("script[src='https://www.googletagmanager.com/gtag/js?id=G-0QBDX221PR'] + script").remove();
|
|
11
11
|
$("script[src='https://www.googletagmanager.com/gtag/js?id=G-0QBDX221PR']").remove();
|
|
12
|
-
// Remove Crowdjet
|
|
12
|
+
// Remove Crowdjet (removed upstream. retained here for legacy support.)
|
|
13
13
|
$("script[src='https://crowdin.com/js/crowdjet/crowdjet.js']").remove();
|
|
14
14
|
$("#crowdjet-container").remove();
|
|
15
15
|
$("#crowdjet-expand-container").remove();
|
|
16
16
|
// Move all JS to external file.
|
|
17
17
|
const indexJs = $("script:not([src])")
|
|
18
18
|
.text()
|
|
19
|
-
.
|
|
19
|
+
// 1494 is the base version of the game. fb07a6718893e6e1039c9ee77ecb388b1da3600a is a commit hash from this tree.
|
|
20
|
+
.replaceAll(/Date.now\(\)/g, "1494-fb07a6718893e6e1039c9ee77ecb388b1da3600a");
|
|
20
21
|
await writeFile("index.js", indexJs);
|
|
21
22
|
$("script:not([src])").remove();
|
|
22
23
|
$("html").append('<script type="text/javascript" src="index.js"></script>');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewrite-index.js","sourceRoot":"","sources":["../../source/devcontainer/rewrite-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,MAAM,IAAI,GAAG,KAAK,IAAI,EAAE;IACtB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IACrE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAElC,iCAAiC;IACjC,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,CAAC;IAE7B,eAAe;IACf,CAAC,CAAC,iFAAiF,CAAC,CAAC,MAAM,EAAE,CAAC;IAC9F,CAAC,CAAC,wEAAwE,CAAC,CAAC,MAAM,EAAE,CAAC;IAErF,
|
|
1
|
+
{"version":3,"file":"rewrite-index.js","sourceRoot":"","sources":["../../source/devcontainer/rewrite-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,MAAM,IAAI,GAAG,KAAK,IAAI,EAAE;IACtB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IACrE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAElC,iCAAiC;IACjC,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,CAAC;IAE7B,eAAe;IACf,CAAC,CAAC,iFAAiF,CAAC,CAAC,MAAM,EAAE,CAAC;IAC9F,CAAC,CAAC,wEAAwE,CAAC,CAAC,MAAM,EAAE,CAAC;IAErF,wEAAwE;IACxE,CAAC,CAAC,2DAA2D,CAAC,CAAC,MAAM,EAAE,CAAC;IACxE,CAAC,CAAC,qBAAqB,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,CAAC,CAAC,4BAA4B,CAAC,CAAC,MAAM,EAAE,CAAC;IAEzC,gCAAgC;IAChC,MAAM,OAAO,GAAG,CAAC,CAAC,mBAAmB,CAAC;SACnC,IAAI,EAAE;QACP,kHAAkH;SACjH,UAAU,CAAC,eAAe,EAAE,+CAA+C,CAAC,CAAC;IAEhF,MAAM,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAErC,CAAC,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,yDAAyD,CAAC,CAAC;IAE5E,6BAA6B;IAC7B,MAAM,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF,IAAI,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// source/devcontainer/inject-scripts.ts
|
|
4
|
-
import { readFileSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
var indexHtml = readFileSync("index.html", "utf8");
|
|
6
|
-
var injectables =
|
|
6
|
+
var injectables = readdirSync("overlay").map((_) => _.endsWith(".inject.js"));
|
|
7
7
|
var injectedHtml = indexHtml.replace(
|
|
8
8
|
"</body>",
|
|
9
9
|
`<script>
|
|
@@ -15,8 +15,4 @@ var injectedHtml = indexHtml.replace(
|
|
|
15
15
|
}
|
|
16
16
|
</script></body>`
|
|
17
17
|
);
|
|
18
|
-
injectedHtml = injectedHtml.replace(
|
|
19
|
-
/<title>.+<\/title>/,
|
|
20
|
-
"<title>\u2623 Kitten Scientists Development Environment</title>"
|
|
21
|
-
);
|
|
22
18
|
writeFileSync("index.html", injectedHtml);
|
|
@@ -11,7 +11,7 @@ var main = async () => {
|
|
|
11
11
|
$("script[src='https://crowdin.com/js/crowdjet/crowdjet.js']").remove();
|
|
12
12
|
$("#crowdjet-container").remove();
|
|
13
13
|
$("#crowdjet-expand-container").remove();
|
|
14
|
-
const indexJs = $("script:not([src])").text().replaceAll(/Date.now\(\)/g, "1494");
|
|
14
|
+
const indexJs = $("script:not([src])").text().replaceAll(/Date.now\(\)/g, "1494-fb07a6718893e6e1039c9ee77ecb388b1da3600a");
|
|
15
15
|
await writeFile("index.js", indexJs);
|
|
16
16
|
$("script:not([src])").remove();
|
|
17
17
|
$("html").append('<script type="text/javascript" src="index.js"></script>');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@kitten-science/kitten-scientists",
|
|
4
|
-
"version": "2.0.0-beta.11-
|
|
4
|
+
"version": "2.0.0-beta.11-dev-120a52b",
|
|
5
5
|
"description": "Add-on for the wonderful incremental browser game: https://kittensgame.com/web/",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Oliver Salzburg <oliver.salzburg@gmail.com>",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"tslib": "2.8.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@biomejs/biome": "2.0.0-beta.
|
|
48
|
+
"@biomejs/biome": "2.0.0-beta.4",
|
|
49
49
|
"@types/dojo": "1.9.48",
|
|
50
50
|
"@types/jquery": "3.5.32",
|
|
51
|
-
"@types/node": "22.15.
|
|
51
|
+
"@types/node": "22.15.18",
|
|
52
52
|
"@types/semver": "7.7.0",
|
|
53
|
-
"@types/web": "0.0.
|
|
53
|
+
"@types/web": "0.0.234",
|
|
54
54
|
"cheerio": "1.0.0",
|
|
55
55
|
"dojo": "1.17.3",
|
|
56
56
|
"esbuild": "0.25.4",
|