@kitten-science/kitten-scientists 2.0.0-beta.10-dev-c9f410c → 2.0.0-beta.10-dev-0e00eb8

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.
@@ -3,7 +3,7 @@
3
3
  const fs = require("node:fs");
4
4
  const indexHtml = fs.readFileSync("index.html", "utf8");
5
5
  let injectedHtml = indexHtml.replace("</body>", `<script>
6
- const scripts = [ "kitten-science/kitten-scientists.inject.js" ];
6
+ const scripts = [ "overlay/kitten-scientists.inject.js" ];
7
7
 
8
8
  for (const subject of scripts) {
9
9
  const script = document.createElement("script");
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
4
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
5
+ }) : x)(function(x) {
6
+ if (typeof require !== "undefined") return require.apply(this, arguments);
7
+ throw Error('Dynamic require of "' + x + '" is not supported');
8
+ });
9
+ var __esm = (fn, res) => function __init() {
10
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
11
+ };
12
+ var __commonJS = (cb, mod) => function __require2() {
13
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
14
+ };
15
+
16
+ // source/devcontainer/cjs-shim.ts
17
+ import { createRequire } from "node:module";
18
+ import path from "node:path";
19
+ import url from "node:url";
20
+ var init_cjs_shim = __esm({
21
+ "source/devcontainer/cjs-shim.ts"() {
22
+ "use strict";
23
+ globalThis.require = createRequire(import.meta.url);
24
+ globalThis.__filename = url.fileURLToPath(import.meta.url);
25
+ globalThis.__dirname = path.dirname(__filename);
26
+ }
27
+ });
28
+
29
+ // source/devcontainer/inject-scripts.cjs
30
+ var require_inject_scripts = __commonJS({
31
+ "source/devcontainer/inject-scripts.cjs"() {
32
+ init_cjs_shim();
33
+ var fs = __require("node:fs");
34
+ var indexHtml = fs.readFileSync("index.html", "utf8");
35
+ var injectedHtml = indexHtml.replace(
36
+ "</body>",
37
+ `<script>
38
+ const scripts = [ "overlay/kitten-scientists.inject.js" ];
39
+
40
+ for (const subject of scripts) {
41
+ const script = document.createElement("script");
42
+ script.src = subject;
43
+ document.body.appendChild(script);
44
+ }
45
+ </script></body>`
46
+ );
47
+ injectedHtml = injectedHtml.replace(
48
+ /<title>.+<\/title>/,
49
+ "<title>\u2623 Kitten Scientists Development Environment</title>"
50
+ );
51
+ fs.writeFileSync("index.html", injectedHtml);
52
+ }
53
+ });
54
+ export default require_inject_scripts();