hackmud-script-manager 0.20.4-23a791c → 0.20.4-3533b3b
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/hsm.js +1 -1
- package/package.json +1 -1
- package/push.js +6 -4
package/bin/hsm.js
CHANGED
@@ -12,7 +12,7 @@ import { pull } from "../pull.js"
|
|
12
12
|
import { syncMacros } from "../syncMacros.js"
|
13
13
|
import "@samual/lib/readDirectoryWithStats"
|
14
14
|
import "@samual/lib/copyFilePersistent"
|
15
|
-
const version = "0.20.4-
|
15
|
+
const version = "0.20.4-3533b3b",
|
16
16
|
options = new Map(),
|
17
17
|
commands = [],
|
18
18
|
userColours = new Cache(user => {
|
package/package.json
CHANGED
package/push.js
CHANGED
@@ -61,13 +61,15 @@ async function push(
|
|
61
61
|
...hackmudFolder
|
62
62
|
.filter(({ stats, name }) => stats.isFile() && name.endsWith(".key"))
|
63
63
|
.map(({ name }) => name.slice(0, -4))
|
64
|
-
])
|
65
|
-
|
64
|
+
])
|
65
|
+
if (!allUsers.size)
|
66
|
+
throw Error("Could not find any users. Either provide the names of your users or log into a user in hackmud.")
|
67
|
+
const usersToScriptsToPush = new Cache(_user => new Map()),
|
66
68
|
scriptNamesToUsers = new Cache(_scriptName => new Set())
|
67
69
|
for (const script of scripts) {
|
68
70
|
const [user, scriptName] = script.split(".")
|
69
|
-
assert(user, "src/push.ts:
|
70
|
-
assert(scriptName, "src/push.ts:
|
71
|
+
assert(user, "src/push.ts:72:16")
|
72
|
+
assert(scriptName, "src/push.ts:73:22")
|
71
73
|
"*" == user ? scriptNamesToUsers.set(scriptName, allUsers) : scriptNamesToUsers.get(scriptName).add(user)
|
72
74
|
}
|
73
75
|
const sourceFolderFiles = sourceFolder.filter(({ stats }) => stats.isFile()),
|