@wix/ditto-codegen-public 1.0.302 → 1.0.304
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/out.js +29 -3
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -10296,6 +10296,7 @@ var require_CodeGenService = __commonJS({
|
|
|
10296
10296
|
"use strict";
|
|
10297
10297
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10298
10298
|
exports2.CodeGenService = exports2.TaskKind = exports2.Status = void 0;
|
|
10299
|
+
exports2.createCodeGenErrorHandler = createCodeGenErrorHandler;
|
|
10299
10300
|
var http_client_1 = require_index_node();
|
|
10300
10301
|
var http_1 = require_http_impl();
|
|
10301
10302
|
var types_1 = require_types_impl();
|
|
@@ -10306,8 +10307,27 @@ var require_CodeGenService = __commonJS({
|
|
|
10306
10307
|
return types_1.TaskKind;
|
|
10307
10308
|
} });
|
|
10308
10309
|
var logger_12 = require_logger();
|
|
10310
|
+
function createCodeGenErrorHandler(getHttpClient) {
|
|
10311
|
+
return {
|
|
10312
|
+
handleError: (error, { requestOptions }) => {
|
|
10313
|
+
if (!http_client_1.HttpClient.isHttpError(error))
|
|
10314
|
+
return;
|
|
10315
|
+
if (getHttpClient().isCancel(error))
|
|
10316
|
+
return;
|
|
10317
|
+
logger_12.logger.error("[CodeGenService] HTTP request failed", {
|
|
10318
|
+
method: error.config?.method?.toUpperCase(),
|
|
10319
|
+
url: requestOptions.url ?? error.config?.url,
|
|
10320
|
+
status: error.response?.status,
|
|
10321
|
+
code: error.code,
|
|
10322
|
+
requestId: error.requestId || void 0,
|
|
10323
|
+
message: error.message,
|
|
10324
|
+
data: error.response?.data
|
|
10325
|
+
});
|
|
10326
|
+
}
|
|
10327
|
+
};
|
|
10328
|
+
}
|
|
10309
10329
|
var CodeGenService = class {
|
|
10310
|
-
constructor(projectId) {
|
|
10330
|
+
constructor(projectId, httpClient) {
|
|
10311
10331
|
this.projectId = projectId;
|
|
10312
10332
|
this.accessToken = process.env.WIX_ACCESS_TOKEN;
|
|
10313
10333
|
this.sandboxId = process.env.SANDBOX_ID;
|
|
@@ -10440,12 +10460,17 @@ var require_CodeGenService = __commonJS({
|
|
|
10440
10460
|
}));
|
|
10441
10461
|
return resp.data?.job ?? null;
|
|
10442
10462
|
};
|
|
10463
|
+
if (httpClient) {
|
|
10464
|
+
this.httpClient = httpClient;
|
|
10465
|
+
return;
|
|
10466
|
+
}
|
|
10443
10467
|
const serverUrl = process.env.CODEGEN_SERVER_BASE_URL || "https://manage.wix.com";
|
|
10444
10468
|
this.httpClient = (0, http_client_1.createHttpClient)({
|
|
10445
10469
|
baseURL: serverUrl,
|
|
10446
10470
|
headers: {
|
|
10447
10471
|
authorization: `Bearer ${this.accessToken}`
|
|
10448
|
-
}
|
|
10472
|
+
},
|
|
10473
|
+
errorHandler: createCodeGenErrorHandler(() => this.httpClient)
|
|
10449
10474
|
});
|
|
10450
10475
|
}
|
|
10451
10476
|
};
|
|
@@ -12181,7 +12206,8 @@ var require_config = __commonJS({
|
|
|
12181
12206
|
external_directory: {
|
|
12182
12207
|
"/root/.agents/**": "allow",
|
|
12183
12208
|
"/root/.claude/**": "allow",
|
|
12184
|
-
"/root/.opencode/**": "allow"
|
|
12209
|
+
"/root/.opencode/**": "allow",
|
|
12210
|
+
"/tmp/**": "allow"
|
|
12185
12211
|
}
|
|
12186
12212
|
},
|
|
12187
12213
|
instructions: instructionPaths,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/ditto-codegen-public",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.304",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"@wix/ditto-codegen": "1.0.0",
|
|
28
28
|
"esbuild": "^0.27.2"
|
|
29
29
|
},
|
|
30
|
-
"falconPackageHash": "
|
|
30
|
+
"falconPackageHash": "d53e09615584fc40b2d3f3c253c417933b4f2e8655e84f81cb1a9a37"
|
|
31
31
|
}
|