hackmud-script-manager 0.21.1-70f29fa → 0.21.1-761acfc
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/README.md +0 -2
- package/bin/hsm.js +2 -2
- package/package.json +2 -5
- package/processScript/index.js +34 -34
- package/processScript/minify.js +4 -4
- package/processScript/preprocess.js +4 -4
- package/processScript/transform.js +2 -2
package/README.md
CHANGED
@@ -4,8 +4,6 @@ Command made for [Hackmud Scripting Environment](https://github.com/samualtnorma
|
|
4
4
|
|
5
5
|
Join [our Discord server](https://discord.gg/RSa4Sc6pNA)!
|
6
6
|
|
7
|
-
[](https://ko-fi.com/R6R0XN5CX)
|
8
|
-
|
9
7
|
You can read about how HSM works [in my blog post](https://samual.uk/blog/js-code-transformation-niche-environment/).
|
10
8
|
|
11
9
|
## Install
|
package/bin/hsm.js
CHANGED
@@ -78,7 +78,7 @@ if (process.version.startsWith("v21.")) {
|
|
78
78
|
)
|
79
79
|
}
|
80
80
|
if ("v" == commands[0] || "version" == commands[0] || popOption("version", "v")?.value) {
|
81
|
-
console.log("0.21.1-
|
81
|
+
console.log("0.21.1-761acfc")
|
82
82
|
process.exit()
|
83
83
|
}
|
84
84
|
let warnedDeprecatedEmitDtsAlias = !1
|
@@ -418,7 +418,7 @@ function logHelp() {
|
|
418
418
|
default:
|
419
419
|
console.log(
|
420
420
|
colourS(
|
421
|
-
`${colourJ("Hackmud Script Manager")}\n${colourN("Version") + colourS(": ") + colourV("0.21.1-
|
421
|
+
`${colourJ("Hackmud Script Manager")}\n${colourN("Version") + colourS(": ") + colourV("0.21.1-761acfc")}\n\n${colourA("Commands:")}\n${colourL("push")}\n ${pushCommandDescription}\n${colourL("minify")}\n Minify a script file on the spot\n${colourL("emit-dts")}\n Generate a type declaration file for a directory of scripts\n${colourL("sync-macros")}\n Sync macros across all hackmud users\n${colourL("pull")}\n Pull a script a from a hackmud user's script directory\n\n${colourA("Options:")}\n${colourN("--help")}\n Can be used on any command e.g. ${colourC("hsm")} ${colourL("push")} ${colourN("--help")} to show helpful information`
|
422
422
|
)
|
423
423
|
)
|
424
424
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "hackmud-script-manager",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.21.1-
|
4
|
+
"version": "0.21.1-761acfc",
|
5
5
|
"description": "Script manager for game hackmud, with minification, TypeScript support, and player script type definition generation.",
|
6
6
|
"author": "Samual Norman <me@samual.uk> (https://samual.uk/)",
|
7
7
|
"contributors": [
|
@@ -12,10 +12,7 @@
|
|
12
12
|
],
|
13
13
|
"license": "MIT",
|
14
14
|
"homepage": "https://github.com/samualtnorman/hackmud-script-manager#readme",
|
15
|
-
"repository":
|
16
|
-
"type": "git",
|
17
|
-
"url": "https://github.com/samualtnorman/hackmud-script-manager.git"
|
18
|
-
},
|
15
|
+
"repository": "github:samualtnorman/hackmud-script-manager",
|
19
16
|
"bugs": "https://github.com/samualtnorman/hackmud-script-manager/issues",
|
20
17
|
"keywords": [
|
21
18
|
"api",
|
package/processScript/index.js
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
import { relative, isAbsolute, sep } from "path"
|
2
|
-
import
|
2
|
+
import xm3li283s2pc1y4jqdoz5tu0 from "@babel/generator"
|
3
3
|
import { parse } from "@babel/parser"
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
13
|
-
import
|
14
|
-
import
|
15
|
-
import
|
16
|
-
import
|
17
|
-
import
|
18
|
-
import
|
19
|
-
import
|
4
|
+
import o2aba9o9h8wuk0k0mecssqfz from "@babel/plugin-proposal-decorators"
|
5
|
+
import g53d5sl34mb7u1x4rijkhqhd from "@babel/plugin-proposal-destructuring-private"
|
6
|
+
import b0qjr76co7d9o58bytud2axr from "@babel/plugin-proposal-explicit-resource-management"
|
7
|
+
import tx8uoicnph33anm3eug0hwix from "@babel/plugin-transform-class-properties"
|
8
|
+
import tgtyp3wk38q4xzt5v12xsj7z from "@babel/plugin-transform-class-static-block"
|
9
|
+
import gtqns3nzkqx1hxhpet7x0hkg from "@babel/plugin-transform-exponentiation-operator"
|
10
|
+
import si2pwx8wf5g2ye0fhml1qks4 from "@babel/plugin-transform-json-strings"
|
11
|
+
import bl3tjqlum1xvb9ndbf4v6mwn from "@babel/plugin-transform-logical-assignment-operators"
|
12
|
+
import bbusj2r9n3eowm7ydmnxcpc1 from "@babel/plugin-transform-nullish-coalescing-operator"
|
13
|
+
import f3isqdw6b7wwzr081ppcam18 from "@babel/plugin-transform-numeric-separator"
|
14
|
+
import nh7kvztibirjkvy9eaqbfgh0 from "@babel/plugin-transform-object-rest-spread"
|
15
|
+
import ud7itt7ls58q6qekdym7na00 from "@babel/plugin-transform-optional-catch-binding"
|
16
|
+
import n44vd8wryhjfzww0detjatlx from "@babel/plugin-transform-optional-chaining"
|
17
|
+
import yhb8jop1gjg2ku5vlbkhv6wg from "@babel/plugin-transform-private-property-in-object"
|
18
|
+
import uvebzfd2nt8l33sega3an03y from "@babel/plugin-transform-unicode-sets-regex"
|
19
|
+
import pjl9tion89w88u93tzi69ath from "@babel/traverse"
|
20
20
|
import t from "@babel/types"
|
21
21
|
import rollupPluginAlias from "@rollup/plugin-alias"
|
22
22
|
import { babel } from "@rollup/plugin-babel"
|
@@ -38,23 +38,23 @@ import "acorn"
|
|
38
38
|
import "terser"
|
39
39
|
import "import-meta-resolve"
|
40
40
|
import "@samual/lib/clearObject"
|
41
|
-
const generate =
|
42
|
-
babelPluginProposalDecorators =
|
43
|
-
babelPluginProposalDestructuringPrivate =
|
44
|
-
babelPluginProposalExplicitResourceManagement =
|
45
|
-
babelPluginTransformClassProperties =
|
46
|
-
babelPluginTransformClassStaticBlock =
|
47
|
-
babelPluginTransformExponentiationOperator =
|
48
|
-
babelPluginTransformJsonStrings =
|
49
|
-
babelPluginTransformLogicalAssignmentOperators =
|
50
|
-
babelPluginTransformNullishCoalescingOperator =
|
51
|
-
babelPluginTransformNumericSeparator =
|
52
|
-
babelPluginTransformObjectRestSpread =
|
53
|
-
babelPluginTransformOptionalCatchBinding =
|
54
|
-
babelPluginTransformOptionalChaining =
|
55
|
-
babelPluginTransformPrivatePropertyInObject =
|
56
|
-
babelPluginTransformUnicodeSetsRegex =
|
57
|
-
traverse =
|
41
|
+
const generate = xm3li283s2pc1y4jqdoz5tu0.default,
|
42
|
+
babelPluginProposalDecorators = o2aba9o9h8wuk0k0mecssqfz.default,
|
43
|
+
babelPluginProposalDestructuringPrivate = g53d5sl34mb7u1x4rijkhqhd.default,
|
44
|
+
babelPluginProposalExplicitResourceManagement = b0qjr76co7d9o58bytud2axr.default,
|
45
|
+
babelPluginTransformClassProperties = tx8uoicnph33anm3eug0hwix.default,
|
46
|
+
babelPluginTransformClassStaticBlock = tgtyp3wk38q4xzt5v12xsj7z.default,
|
47
|
+
babelPluginTransformExponentiationOperator = gtqns3nzkqx1hxhpet7x0hkg.default,
|
48
|
+
babelPluginTransformJsonStrings = si2pwx8wf5g2ye0fhml1qks4.default,
|
49
|
+
babelPluginTransformLogicalAssignmentOperators = bl3tjqlum1xvb9ndbf4v6mwn.default,
|
50
|
+
babelPluginTransformNullishCoalescingOperator = bbusj2r9n3eowm7ydmnxcpc1.default,
|
51
|
+
babelPluginTransformNumericSeparator = f3isqdw6b7wwzr081ppcam18.default,
|
52
|
+
babelPluginTransformObjectRestSpread = nh7kvztibirjkvy9eaqbfgh0.default,
|
53
|
+
babelPluginTransformOptionalCatchBinding = ud7itt7ls58q6qekdym7na00.default,
|
54
|
+
babelPluginTransformOptionalChaining = n44vd8wryhjfzww0detjatlx.default,
|
55
|
+
babelPluginTransformPrivatePropertyInObject = yhb8jop1gjg2ku5vlbkhv6wg.default,
|
56
|
+
babelPluginTransformUnicodeSetsRegex = uvebzfd2nt8l33sega3an03y.default,
|
57
|
+
traverse = pjl9tion89w88u93tzi69ath.default,
|
58
58
|
{ format } = prettier
|
59
59
|
async function processScript(
|
60
60
|
code,
|
package/processScript/minify.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import
|
1
|
+
import xm3li283s2pc1y4jqdoz5tu0 from "@babel/generator"
|
2
|
+
import pjl9tion89w88u93tzi69ath from "@babel/traverse"
|
3
3
|
import t from "@babel/types"
|
4
4
|
import { assert } from "@samual/lib/assert"
|
5
5
|
import { countHackmudCharacters } from "@samual/lib/countHackmudCharacters"
|
@@ -7,8 +7,8 @@ import { spliceString } from "@samual/lib/spliceString"
|
|
7
7
|
import { tokenizer, tokTypes } from "acorn"
|
8
8
|
import * as terser from "terser"
|
9
9
|
import { getReferencePathsToGlobal, includesIllegalString, replaceUnsafeStrings } from "./shared.js"
|
10
|
-
const generate =
|
11
|
-
traverse =
|
10
|
+
const generate = xm3li283s2pc1y4jqdoz5tu0.default,
|
11
|
+
traverse = pjl9tion89w88u93tzi69ath.default,
|
12
12
|
minifyNumber = async number =>
|
13
13
|
/\$\((?<number>.+)\)/.exec((await terser.minify(`$(${number})`, { ecma: 2015 })).code).groups.number
|
14
14
|
async function minify(file, { uniqueId = "00000000000", mangleNames = !1, forceQuineCheats, autocomplete } = {}) {
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import
|
1
|
+
import xm3li283s2pc1y4jqdoz5tu0 from "@babel/generator"
|
2
2
|
import { parse } from "@babel/parser"
|
3
|
-
import
|
3
|
+
import pjl9tion89w88u93tzi69ath from "@babel/traverse"
|
4
4
|
import t from "@babel/types"
|
5
5
|
import { assert } from "@samual/lib/assert"
|
6
6
|
import { spliceString } from "@samual/lib/spliceString"
|
7
7
|
import { resolve } from "import-meta-resolve"
|
8
|
-
const generate =
|
9
|
-
traverse =
|
8
|
+
const generate = xm3li283s2pc1y4jqdoz5tu0.default,
|
9
|
+
traverse = pjl9tion89w88u93tzi69ath.default
|
10
10
|
async function preprocess(code, { uniqueId = "00000000000" } = {}) {
|
11
11
|
assert(/^\w{11}$/.test(uniqueId), "src/processScript/preprocess.ts:20:36")
|
12
12
|
const sourceCode = code
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import pjl9tion89w88u93tzi69ath from "@babel/traverse"
|
2
2
|
import t from "@babel/types"
|
3
3
|
import { assert } from "@samual/lib/assert"
|
4
4
|
import { clearObject } from "@samual/lib/clearObject"
|
5
5
|
import { validDBMethods } from "../constants.js"
|
6
6
|
import { getReferencePathsToGlobal } from "./shared.js"
|
7
|
-
const traverse =
|
7
|
+
const traverse = pjl9tion89w88u93tzi69ath.default,
|
8
8
|
globalFunctionsUnder7Characters = [
|
9
9
|
"Map",
|
10
10
|
"Set",
|