@multiplayer-app/cli 2.0.3 → 2.0.4
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/dist/index.js +20 -59
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -106342,7 +106342,7 @@ var require_form_data = __commonJS((exports, module2) => {
|
|
|
106342
106342
|
var http = __require("http");
|
|
106343
106343
|
var https = __require("https");
|
|
106344
106344
|
var parseUrl = __require("url").parse;
|
|
106345
|
-
var
|
|
106345
|
+
var fs7 = __require("fs");
|
|
106346
106346
|
var Stream3 = __require("stream").Stream;
|
|
106347
106347
|
var crypto2 = __require("crypto");
|
|
106348
106348
|
var mime = require_mime_types();
|
|
@@ -106410,7 +106410,7 @@ var require_form_data = __commonJS((exports, module2) => {
|
|
|
106410
106410
|
if (value2.end != null && value2.end != Infinity && value2.start != null) {
|
|
106411
106411
|
callback(null, value2.end + 1 - (value2.start ? value2.start : 0));
|
|
106412
106412
|
} else {
|
|
106413
|
-
|
|
106413
|
+
fs7.stat(value2.path, function(err, stat) {
|
|
106414
106414
|
if (err) {
|
|
106415
106415
|
callback(err);
|
|
106416
106416
|
return;
|
|
@@ -107460,7 +107460,7 @@ var require_once = __commonJS((exports, module2) => {
|
|
|
107460
107460
|
// ../../node_modules/formidable/dist/index.cjs
|
|
107461
107461
|
var require_dist4 = __commonJS((exports) => {
|
|
107462
107462
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
107463
|
-
var
|
|
107463
|
+
var fs7 = __require("fs");
|
|
107464
107464
|
var crypto2 = __require("crypto");
|
|
107465
107465
|
var node_events = __require("events");
|
|
107466
107466
|
var cuid2 = require_cuid2();
|
|
@@ -107486,7 +107486,7 @@ var require_dist4 = __commonJS((exports) => {
|
|
|
107486
107486
|
}
|
|
107487
107487
|
}
|
|
107488
107488
|
open() {
|
|
107489
|
-
this._writeStream =
|
|
107489
|
+
this._writeStream = fs7.createWriteStream(this.filepath);
|
|
107490
107490
|
this._writeStream.on("error", (err) => {
|
|
107491
107491
|
this.emit("error", err);
|
|
107492
107492
|
});
|
|
@@ -107537,7 +107537,7 @@ var require_dist4 = __commonJS((exports) => {
|
|
|
107537
107537
|
this._writeStream.destroy();
|
|
107538
107538
|
const filepath = this.filepath;
|
|
107539
107539
|
setTimeout(function() {
|
|
107540
|
-
|
|
107540
|
+
fs7.unlink(filepath, () => {});
|
|
107541
107541
|
}, 1);
|
|
107542
107542
|
}
|
|
107543
107543
|
}
|
|
@@ -110129,7 +110129,7 @@ var require_node4 = __commonJS((exports, module2) => {
|
|
|
110129
110129
|
var Stream3 = __require("stream");
|
|
110130
110130
|
var https = __require("https");
|
|
110131
110131
|
var http = __require("http");
|
|
110132
|
-
var
|
|
110132
|
+
var fs7 = __require("fs");
|
|
110133
110133
|
var zlib = __require("zlib");
|
|
110134
110134
|
var util3 = __require("util");
|
|
110135
110135
|
var qs = require_lib7();
|
|
@@ -110240,7 +110240,7 @@ var require_node4 = __commonJS((exports, module2) => {
|
|
|
110240
110240
|
if (!o.filename)
|
|
110241
110241
|
o.filename = file;
|
|
110242
110242
|
debug13("creating `fs.ReadStream` instance for file: %s", file);
|
|
110243
|
-
file =
|
|
110243
|
+
file = fs7.createReadStream(file);
|
|
110244
110244
|
file.on("error", (error3) => {
|
|
110245
110245
|
const formData = this._getFormData();
|
|
110246
110246
|
formData.emit("error", error3);
|
|
@@ -166013,6 +166013,8 @@ var {
|
|
|
166013
166013
|
} = import__.default;
|
|
166014
166014
|
|
|
166015
166015
|
// src/cli/flags.ts
|
|
166016
|
+
import fs6 from "fs";
|
|
166017
|
+
import path13 from "path";
|
|
166016
166018
|
import os5 from "os";
|
|
166017
166019
|
|
|
166018
166020
|
// src/cli/profile.ts
|
|
@@ -166113,57 +166115,16 @@ function loadProfile(profileName, projectDir) {
|
|
|
166113
166115
|
const merged = { ...defaultRaw, ...profileRaw };
|
|
166114
166116
|
return iniToProfileConfig(merged);
|
|
166115
166117
|
}
|
|
166116
|
-
// package.json
|
|
166117
|
-
var package_default2 = {
|
|
166118
|
-
name: "@multiplayer-app/cli",
|
|
166119
|
-
version: "2.0.3",
|
|
166120
|
-
description: "Multiplayer CLI",
|
|
166121
|
-
main: "dist/index.js",
|
|
166122
|
-
bin: {
|
|
166123
|
-
multiplayer: "./dist/index.js"
|
|
166124
|
-
},
|
|
166125
|
-
scripts: {
|
|
166126
|
-
build: "bun build src/index.tsx --outdir dist --target bun --format esm --sourcemap=none --external @anthropic-ai/claude-agent-sdk && rm -f dist/index.js.map",
|
|
166127
|
-
start: "bun dist/index.js",
|
|
166128
|
-
dev: "bun src/index.tsx",
|
|
166129
|
-
typecheck: "tsc --noEmit",
|
|
166130
|
-
lint: "eslint src/**/*.ts --config eslint.config.js",
|
|
166131
|
-
prepublishOnly: "npm run build"
|
|
166132
|
-
},
|
|
166133
|
-
license: "MIT",
|
|
166134
|
-
dependencies: {
|
|
166135
|
-
"@anthropic-ai/claude-agent-sdk": "0.2.89",
|
|
166136
|
-
"@anthropic-ai/sdk": "^0.78.0",
|
|
166137
|
-
"@opentui/core": "0.1.93",
|
|
166138
|
-
"@opentui/react": "0.1.93",
|
|
166139
|
-
commander: "14.0.3",
|
|
166140
|
-
dotenv: "16.0.0",
|
|
166141
|
-
jsonwebtoken: "9.0.3",
|
|
166142
|
-
mongoose: "9.3.3",
|
|
166143
|
-
openai: "6.33.0",
|
|
166144
|
-
react: "19.2.4",
|
|
166145
|
-
"simple-git": "3.33.0",
|
|
166146
|
-
"socket.io-client": "4.8.3",
|
|
166147
|
-
superagent: "10.3.0"
|
|
166148
|
-
},
|
|
166149
|
-
overrides: {
|
|
166150
|
-
react: "19.2.4"
|
|
166151
|
-
},
|
|
166152
|
-
devDependencies: {
|
|
166153
|
-
"@sindresorhus/tsconfig": "^8.1.0",
|
|
166154
|
-
"@types/jsonwebtoken": "^9.0.10",
|
|
166155
|
-
"@types/node": "25.5.0",
|
|
166156
|
-
"@types/react": "19.2.14",
|
|
166157
|
-
"@types/superagent": "8.1.9",
|
|
166158
|
-
eslint: "10.1.0",
|
|
166159
|
-
typescript: "6.0.2"
|
|
166160
|
-
}
|
|
166161
|
-
};
|
|
166162
166118
|
|
|
166163
166119
|
// src/cli/flags.ts
|
|
166120
|
+
function getVersion() {
|
|
166121
|
+
const pkgPath = path13.resolve(import.meta.dirname, "..", "package.json");
|
|
166122
|
+
const pkg = JSON.parse(fs6.readFileSync(pkgPath, "utf-8"));
|
|
166123
|
+
return pkg.version;
|
|
166124
|
+
}
|
|
166164
166125
|
function parseFlags(argv) {
|
|
166165
166126
|
const program2 = new Command;
|
|
166166
|
-
program2.name("multiplayer").description("Multiplayer debugging agent \u2014 automatically resolves issues using AI").version(
|
|
166127
|
+
program2.name("multiplayer").description("Multiplayer debugging agent \u2014 automatically resolves issues using AI").version(getVersion()).option("--headless", "Run without TUI (structured log output, requires full config); also set via MULTIPLAYER_HEADLESS=true").option("--profile <name>", 'Config profile to use from .multiplayer/config (default: "default"); also set via MULTIPLAYER_PROFILE').option("--url <url>", "Multiplayer base API URL").option("--api-key <key>", "Multiplayer API key").option("--name <name>", "Agent name (defaults to hostname)").option("--dir <path>", "Project directory (must be a git repo)").option("--model <name>", "AI model name (e.g. claude-sonnet-4-6, gpt-4o)").option("--model-key <key>", "API key for the AI provider").option("--model-url <url>", "Optional base URL for OpenAI-compatible APIs").option("--max-concurrent <n>", "Maximum number of issues to resolve in parallel", String(DEFAULT_MAX_CONCURRENT)).option("--no-git-branch", "Work in current branch \u2014 no worktree, no new branch, no push").option("--health-port <port>", "Port for HTTP health check endpoint (headless mode only); also set via MULTIPLAYER_HEALTH_PORT").exitOverride();
|
|
166167
166128
|
try {
|
|
166168
166129
|
program2.parse(argv);
|
|
166169
166130
|
} catch (err) {
|
|
@@ -166284,13 +166245,13 @@ var create2 = async (options, callback) => {
|
|
|
166284
166245
|
|
|
166285
166246
|
// src/commands/sourcemaps/upload.ts
|
|
166286
166247
|
var import_jsonwebtoken4 = __toESM(require_jsonwebtoken(), 1);
|
|
166287
|
-
import
|
|
166288
|
-
import
|
|
166248
|
+
import fs7 from "fs";
|
|
166249
|
+
import path14 from "path";
|
|
166289
166250
|
var collectSourcemaps = (dir) => {
|
|
166290
|
-
const entries =
|
|
166251
|
+
const entries = fs7.readdirSync(dir, { withFileTypes: true });
|
|
166291
166252
|
const files = [];
|
|
166292
166253
|
for (const entry of entries) {
|
|
166293
|
-
const fullPath =
|
|
166254
|
+
const fullPath = path14.join(dir, entry.name);
|
|
166294
166255
|
if (entry.isDirectory()) {
|
|
166295
166256
|
files.push(...collectSourcemaps(fullPath));
|
|
166296
166257
|
} else if (entry.isFile() && entry.name.endsWith(".map")) {
|
|
@@ -166311,7 +166272,7 @@ var upload = async (directories, options, callback) => {
|
|
|
166311
166272
|
return callback(new Error(`No sourcemap files found in directories: ${directories.join(", ")}`), null);
|
|
166312
166273
|
}
|
|
166313
166274
|
for (const filePath of files) {
|
|
166314
|
-
const stream =
|
|
166275
|
+
const stream = fs7.createReadStream(filePath);
|
|
166315
166276
|
await uploadSourcemap(apiKey, jwtToken.workspace, jwtToken.project, releaseId, filePath, stream, baseUrl);
|
|
166316
166277
|
}
|
|
166317
166278
|
callback(null, { message: `Uploaded ${files.length} sourcemap(s) successfully` });
|