@mudramo/mudcode 0.6.6 → 1.0.1
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/discode +9 -3
- package/bin/mudcode +3 -0
- package/package.json +3 -2
- package/postinstall.mjs +2 -2
package/bin/discode
CHANGED
|
@@ -10,6 +10,7 @@ import { createRequire } from 'module';
|
|
|
10
10
|
const require = createRequire(import.meta.url);
|
|
11
11
|
const __filename = fileURLToPath(import.meta.url);
|
|
12
12
|
const __dirname = path.dirname(__filename);
|
|
13
|
+
const selfPackageName = readSelfPackageName();
|
|
13
14
|
|
|
14
15
|
function normalizeScope(raw) {
|
|
15
16
|
const trimmed = (raw || '').trim();
|
|
@@ -53,7 +54,10 @@ const packageScope = resolvePackageScope();
|
|
|
53
54
|
function spawnAndExit(command, args) {
|
|
54
55
|
const result = childProcess.spawnSync(command, args, {
|
|
55
56
|
stdio: 'inherit',
|
|
56
|
-
env:
|
|
57
|
+
env: {
|
|
58
|
+
...process.env,
|
|
59
|
+
...(selfPackageName ? { DISCODE_NPM_PACKAGE: selfPackageName } : {}),
|
|
60
|
+
},
|
|
57
61
|
});
|
|
58
62
|
if (result.error) {
|
|
59
63
|
console.error(result.error.message);
|
|
@@ -67,6 +71,7 @@ function spawnAndExitWithEnv(command, args, envPatch) {
|
|
|
67
71
|
stdio: 'inherit',
|
|
68
72
|
env: {
|
|
69
73
|
...process.env,
|
|
74
|
+
...(selfPackageName ? { DISCODE_NPM_PACKAGE: selfPackageName } : {}),
|
|
70
75
|
...envPatch,
|
|
71
76
|
},
|
|
72
77
|
});
|
|
@@ -188,6 +193,7 @@ if (devEntrypoint) {
|
|
|
188
193
|
spawnAndExit(process.execPath, [devEntrypoint, ...process.argv.slice(2)]);
|
|
189
194
|
}
|
|
190
195
|
|
|
191
|
-
|
|
192
|
-
console.error(
|
|
196
|
+
const packageName = readSelfPackageName() || `${packageScope}/mudcode`;
|
|
197
|
+
console.error('No runnable mudcode binary found for this platform.');
|
|
198
|
+
console.error(`Try reinstalling with: npm i -g ${packageName}`);
|
|
193
199
|
process.exit(1);
|
package/bin/mudcode
ADDED
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mudramo/mudcode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Bridge AI agent outputs to Discord via Claude Code hooks and tmux",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
7
|
+
"mudcode": "bin/mudcode",
|
|
7
8
|
"discode": "bin/discode"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
11
|
"postinstall": "node ./postinstall.mjs"
|
|
11
12
|
},
|
|
12
13
|
"optionalDependencies": {
|
|
13
|
-
"@mudramo/discode-linux-x64": "0.
|
|
14
|
+
"@mudramo/discode-linux-x64": "1.0.1"
|
|
14
15
|
}
|
|
15
16
|
}
|
package/postinstall.mjs
CHANGED
|
@@ -16,6 +16,6 @@ const platform = platformMap[os.platform()] || os.platform();
|
|
|
16
16
|
const arch = archMap[os.arch()] || os.arch();
|
|
17
17
|
|
|
18
18
|
if ((platform !== 'darwin' && platform !== 'linux' && platform !== 'windows') || (arch !== 'x64' && arch !== 'arm64')) {
|
|
19
|
-
console.warn(`[
|
|
20
|
-
console.warn('[
|
|
19
|
+
console.warn(`[mudcode] No prebuilt binary available for ${platform}/${arch}.`);
|
|
20
|
+
console.warn('[mudcode] You can still run from source with Node + Bun installed.');
|
|
21
21
|
}
|