yolkbot 1.4.6 → 1.4.8
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/LICENSE.md +114 -0
- package/browser/build/global.js +1 -1
- package/browser/build/module.js +1 -1
- package/dist/util.js +3 -1
- package/package.json +4 -2
package/dist/util.js
CHANGED
|
@@ -10,7 +10,9 @@ export const fetchMap = async (name, hash) => {
|
|
|
10
10
|
const mapCache = join(yolkbotCache, "maps");
|
|
11
11
|
if (!existsSync(mapCache))
|
|
12
12
|
mkdirSync(mapCache);
|
|
13
|
-
const
|
|
13
|
+
const safeName = String(name).replace(/[^a-z0-9_-]/gi, "_");
|
|
14
|
+
const safeHash = String(hash).replace(/[^a-z0-9_-]/gi, "_");
|
|
15
|
+
const mapFile = join(mapCache, `${safeName}-${safeHash}.json`);
|
|
14
16
|
if (existsSync(mapFile))
|
|
15
17
|
return JSON.parse(readFileSync(mapFile, "utf-8"));
|
|
16
18
|
const data = await (await fetch(`https://x.yolkbot.xyz/data/maps/full/${name}.json?${hash}`)).json();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yolkbot",
|
|
3
3
|
"description": "create a shell shockers bot in under 10 lines.",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.8",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shell shockers",
|
|
7
7
|
"shellshock.io",
|
|
@@ -19,11 +19,13 @@
|
|
|
19
19
|
"url": "git+https://github.com/yolkorg/yolkbot.git"
|
|
20
20
|
},
|
|
21
21
|
"type": "module",
|
|
22
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
22
23
|
"files": [
|
|
23
24
|
"browser/build/*.js",
|
|
24
25
|
"dist/**/*",
|
|
25
26
|
"package.json",
|
|
26
|
-
"README.md"
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE.md"
|
|
27
29
|
],
|
|
28
30
|
"exports": {
|
|
29
31
|
"./package.json": "./package.json",
|