@studioindia/designx 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.cjs +14 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studioindia/designx",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "AI-powered product design pipeline — from brief to working app",
5
5
  "type": "module",
6
6
  "engines": {
package/server.cjs CHANGED
@@ -46257,7 +46257,7 @@ var agentRuns = loadAgentRuns();
46257
46257
  var diagnosticsEvents = [];
46258
46258
  var diagnosticsEventSequence = 0;
46259
46259
  var REQUEST_BODY_LIMIT_BYTES = parseByteLimitToBytes(REQUEST_BODY_LIMIT);
46260
- app.use((0, import_cors.default)({ origin: "http://localhost:5173" }));
46260
+ app.use((0, import_cors.default)({ origin: [`http://localhost:${PORT}`, "http://localhost:5173"] }));
46261
46261
  app.use((req, res, next) => {
46262
46262
  const diagnosticReq = req;
46263
46263
  const requestId = resolveRequestId(req);
@@ -47276,7 +47276,18 @@ app.use(
47276
47276
  (0, import_http_proxy_middleware.createProxyMiddleware)({
47277
47277
  target: "https://github.com",
47278
47278
  changeOrigin: true,
47279
- pathRewrite: { "^/api/github-auth": "" }
47279
+ pathRewrite: { "^/api/github-auth": "" },
47280
+ on: {
47281
+ proxyReq: (proxyReq, req) => {
47282
+ const body = req.body;
47283
+ if (body && typeof body === "object" && Object.keys(body).length > 0) {
47284
+ const bodyStr = new URLSearchParams(body).toString();
47285
+ proxyReq.setHeader("Content-Type", "application/x-www-form-urlencoded");
47286
+ proxyReq.setHeader("Content-Length", Buffer.byteLength(bodyStr));
47287
+ proxyReq.write(bodyStr);
47288
+ }
47289
+ }
47290
+ }
47280
47291
  })
47281
47292
  );
47282
47293
  app.use(
@@ -47456,7 +47467,7 @@ function writeJson(filePath, data) {
47456
47467
  }
47457
47468
  app.get("/api/config", (_req, res) => {
47458
47469
  res.json({
47459
- version: "1.0.0",
47470
+ version: "1.0.2",
47460
47471
  port: PORT,
47461
47472
  dataDir: DESIGNX_DATA_DIR,
47462
47473
  isProd: IS_PROD