hackmud-script-manager-ng 0.26.6 → 0.26.7
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/bin/hsm.js +2 -2
- package/env.d.ts +10 -0
- package/package.json +1 -1
- 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/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.26.
|
|
81
|
+
console.log("0.26.7")
|
|
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.26.
|
|
421
|
+
`${colourJ("Hackmud Script Manager")}\n${colourN("Version") + colourS(": ") + colourV("0.26.7")}\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/env.d.ts
CHANGED
|
@@ -632,6 +632,16 @@ type Lowsec = Midsec & PlayerLowsec & {
|
|
|
632
632
|
|
|
633
633
|
/** **LOWSEC** */ expose_upgrades: (args: { target: string }) => UpgradeBase[] | ScriptFailure
|
|
634
634
|
/** **LOWSEC** */ xfer_upgrade_from: (args: { target: string, i: number | number[] }) => ScriptResponse<{}>
|
|
635
|
+
|
|
636
|
+
/** **LOWSEC** */ expose_transactions: (args: {target: string, start?: number}) => {
|
|
637
|
+
time: Date
|
|
638
|
+
amount: number
|
|
639
|
+
sender: string
|
|
640
|
+
recipient: string
|
|
641
|
+
script: string | null
|
|
642
|
+
memo?: string
|
|
643
|
+
}[] | ScriptFailure
|
|
644
|
+
/** **LOWSEC** */ expose_upgrade_log: (args: {target: string, start?: number}) => { t: Date, u: string, r: string, msg: string }[] | ScriptFailure
|
|
635
645
|
}
|
|
636
646
|
}
|
|
637
647
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hackmud-script-manager-ng",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.26.
|
|
4
|
+
"version": "0.26.7",
|
|
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": [
|
package/processScript/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { relative, isAbsolute, sep } from "path"
|
|
2
|
-
import
|
|
2
|
+
import z7ms7xylha64l257mgtbrknl 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 udiwrygtg13zp0hf696ksc66 from "@babel/plugin-proposal-decorators"
|
|
5
|
+
import lle860xpomtyraitshhxtqyo from "@babel/plugin-proposal-destructuring-private"
|
|
6
|
+
import pvxyh6g4h53ovuzofz9zi4il from "@babel/plugin-transform-class-properties"
|
|
7
|
+
import rskew0xn9qfi7v2cunit8uk9 from "@babel/plugin-transform-class-static-block"
|
|
8
|
+
import iza5jw83w1v6f4dafwsf5oma from "@babel/plugin-transform-explicit-resource-management"
|
|
9
|
+
import p5zoobtapclhqtvhcrsx4ttj from "@babel/plugin-transform-exponentiation-operator"
|
|
10
|
+
import qzkwgj54dgvp5mm8c97zu9b9 from "@babel/plugin-transform-json-strings"
|
|
11
|
+
import og94r2v5v4w726nr6lged1bs from "@babel/plugin-transform-logical-assignment-operators"
|
|
12
|
+
import bbu48265w99kp883fazdo4ao from "@babel/plugin-transform-nullish-coalescing-operator"
|
|
13
|
+
import jkba5hp3wda4mczz8j2wv1g8 from "@babel/plugin-transform-numeric-separator"
|
|
14
|
+
import kxqc2t6e1jbaxntoofo9ihg2 from "@babel/plugin-transform-object-rest-spread"
|
|
15
|
+
import iaajb2reux88uh7nbhoxfbg8 from "@babel/plugin-transform-optional-catch-binding"
|
|
16
|
+
import p3ysv9wu51kceer7mrejm39j from "@babel/plugin-transform-optional-chaining"
|
|
17
|
+
import cpu0qi70fzdzrpf23saschx1 from "@babel/plugin-transform-private-property-in-object"
|
|
18
|
+
import b4jjrrjqcmdda331fq2if9zg from "@babel/plugin-transform-unicode-sets-regex"
|
|
19
|
+
import xnbozgxylp5v91ib04yav3z3 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
|
-
babelPluginTransformClassProperties =
|
|
45
|
-
babelPluginTransformClassStaticBlock =
|
|
46
|
-
babelPluginTransformExplicitResourceManagement =
|
|
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 = z7ms7xylha64l257mgtbrknl.default,
|
|
42
|
+
babelPluginProposalDecorators = udiwrygtg13zp0hf696ksc66.default,
|
|
43
|
+
babelPluginProposalDestructuringPrivate = lle860xpomtyraitshhxtqyo.default,
|
|
44
|
+
babelPluginTransformClassProperties = pvxyh6g4h53ovuzofz9zi4il.default,
|
|
45
|
+
babelPluginTransformClassStaticBlock = rskew0xn9qfi7v2cunit8uk9.default,
|
|
46
|
+
babelPluginTransformExplicitResourceManagement = iza5jw83w1v6f4dafwsf5oma.default,
|
|
47
|
+
babelPluginTransformExponentiationOperator = p5zoobtapclhqtvhcrsx4ttj.default,
|
|
48
|
+
babelPluginTransformJsonStrings = qzkwgj54dgvp5mm8c97zu9b9.default,
|
|
49
|
+
babelPluginTransformLogicalAssignmentOperators = og94r2v5v4w726nr6lged1bs.default,
|
|
50
|
+
babelPluginTransformNullishCoalescingOperator = bbu48265w99kp883fazdo4ao.default,
|
|
51
|
+
babelPluginTransformNumericSeparator = jkba5hp3wda4mczz8j2wv1g8.default,
|
|
52
|
+
babelPluginTransformObjectRestSpread = kxqc2t6e1jbaxntoofo9ihg2.default,
|
|
53
|
+
babelPluginTransformOptionalCatchBinding = iaajb2reux88uh7nbhoxfbg8.default,
|
|
54
|
+
babelPluginTransformOptionalChaining = p3ysv9wu51kceer7mrejm39j.default,
|
|
55
|
+
babelPluginTransformPrivatePropertyInObject = cpu0qi70fzdzrpf23saschx1.default,
|
|
56
|
+
babelPluginTransformUnicodeSetsRegex = b4jjrrjqcmdda331fq2if9zg.default,
|
|
57
|
+
traverse = xnbozgxylp5v91ib04yav3z3.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 z7ms7xylha64l257mgtbrknl from "@babel/generator"
|
|
2
|
+
import xnbozgxylp5v91ib04yav3z3 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, replaceUnsafeStrings, includesIllegalString } from "./shared.js"
|
|
10
|
-
const generate =
|
|
11
|
-
traverse =
|
|
10
|
+
const generate = z7ms7xylha64l257mgtbrknl.default,
|
|
11
|
+
traverse = xnbozgxylp5v91ib04yav3z3.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 } = {}) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import z7ms7xylha64l257mgtbrknl from "@babel/generator"
|
|
2
2
|
import { parse } from "@babel/parser"
|
|
3
|
-
import
|
|
3
|
+
import xnbozgxylp5v91ib04yav3z3 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 = z7ms7xylha64l257mgtbrknl.default,
|
|
9
|
+
traverse = xnbozgxylp5v91ib04yav3z3.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 xnbozgxylp5v91ib04yav3z3 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 = xnbozgxylp5v91ib04yav3z3.default,
|
|
8
8
|
globalFunctionsUnder7Characters = [
|
|
9
9
|
"Map",
|
|
10
10
|
"Set",
|