@wix/ditto-codegen-public 1.0.213 → 1.0.215
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 +49 -22
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -1329,55 +1329,82 @@ var require_CodeGenService = __commonJS({
|
|
|
1329
1329
|
constructor(baseUrl, projectId) {
|
|
1330
1330
|
this.baseUrl = baseUrl;
|
|
1331
1331
|
this.projectId = projectId;
|
|
1332
|
+
this.accessToken = process.env.WIX_ACCESS_TOKEN;
|
|
1332
1333
|
this.fetchPendingJobs = async () => {
|
|
1333
|
-
const resp = await fetch(`${this.baseUrl}/projects/${this.projectId}/jobs
|
|
1334
|
+
const resp = await fetch(`${this.baseUrl}/projects/${this.projectId}/jobs`, {
|
|
1335
|
+
headers: {
|
|
1336
|
+
authorization: `Bearer ${this.accessToken}`
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
1334
1339
|
const jobsData = await resp.json();
|
|
1335
1340
|
return jobsData.jobs.filter((job) => job.status === ditto_codegen_types_12.Status.PENDING);
|
|
1336
1341
|
};
|
|
1337
1342
|
this.markJobAsCompleted = async (jobId) => {
|
|
1338
1343
|
await fetch(`${this.baseUrl}/projects/${this.projectId}/jobs/${jobId}`, {
|
|
1339
1344
|
method: "PUT",
|
|
1340
|
-
headers: {
|
|
1345
|
+
headers: {
|
|
1346
|
+
"Content-Type": "application/json",
|
|
1347
|
+
authorization: `Bearer ${this.accessToken}`
|
|
1348
|
+
},
|
|
1341
1349
|
body: JSON.stringify({ status: ditto_codegen_types_12.Status.COMPLETED })
|
|
1342
1350
|
});
|
|
1343
1351
|
};
|
|
1344
1352
|
this.markJobAsCancelled = async (jobId) => {
|
|
1345
1353
|
await fetch(`${this.baseUrl}/projects/${this.projectId}/jobs/${jobId}`, {
|
|
1346
1354
|
method: "PUT",
|
|
1347
|
-
headers: {
|
|
1355
|
+
headers: {
|
|
1356
|
+
"Content-Type": "application/json",
|
|
1357
|
+
authorization: `Bearer ${this.accessToken}`
|
|
1358
|
+
},
|
|
1348
1359
|
body: JSON.stringify({ status: ditto_codegen_types_12.Status.CANCELLED })
|
|
1349
1360
|
});
|
|
1350
1361
|
};
|
|
1351
1362
|
this.updateJob = async (jobId, payload) => {
|
|
1352
1363
|
await fetch(`${this.baseUrl}/projects/${this.projectId}/jobs/${jobId}`, {
|
|
1353
1364
|
method: "PUT",
|
|
1354
|
-
headers: {
|
|
1365
|
+
headers: {
|
|
1366
|
+
"Content-Type": "application/json",
|
|
1367
|
+
authorization: `Bearer ${this.accessToken}`
|
|
1368
|
+
},
|
|
1355
1369
|
body: JSON.stringify({ payload })
|
|
1356
1370
|
});
|
|
1357
1371
|
};
|
|
1358
1372
|
this.updateJobStatus = async (jobId, status) => {
|
|
1359
1373
|
await fetch(`${this.baseUrl}/projects/${this.projectId}/jobs/${jobId}`, {
|
|
1360
1374
|
method: "PUT",
|
|
1361
|
-
headers: {
|
|
1375
|
+
headers: {
|
|
1376
|
+
"Content-Type": "application/json",
|
|
1377
|
+
authorization: `Bearer ${this.accessToken}`
|
|
1378
|
+
},
|
|
1362
1379
|
body: JSON.stringify({ status })
|
|
1363
1380
|
});
|
|
1364
1381
|
};
|
|
1365
1382
|
this.updateTask = async (jobId, taskId, status, payload) => {
|
|
1366
1383
|
await fetch(`${this.baseUrl}/projects/${this.projectId}/jobs/${jobId}/tasks/${taskId}`, {
|
|
1367
1384
|
method: "PUT",
|
|
1368
|
-
headers: {
|
|
1385
|
+
headers: {
|
|
1386
|
+
"Content-Type": "application/json",
|
|
1387
|
+
authorization: `Bearer ${this.accessToken}`
|
|
1388
|
+
},
|
|
1369
1389
|
body: JSON.stringify({ status, payload })
|
|
1370
1390
|
});
|
|
1371
1391
|
};
|
|
1372
1392
|
this.addTask = async (jobId, task) => {
|
|
1373
1393
|
await fetch(`${this.baseUrl}/projects/${this.projectId}/jobs/${jobId}/tasks`, {
|
|
1374
1394
|
method: "POST",
|
|
1375
|
-
headers: {
|
|
1395
|
+
headers: {
|
|
1396
|
+
"Content-Type": "application/json",
|
|
1397
|
+
authorization: `Bearer ${this.accessToken}`
|
|
1398
|
+
},
|
|
1376
1399
|
body: JSON.stringify(this.mapServerTask(task))
|
|
1377
1400
|
});
|
|
1378
1401
|
};
|
|
1379
1402
|
this.getJob = async (jobId) => {
|
|
1380
|
-
const resp = await fetch(`${this.baseUrl}/projects/${this.projectId}/jobs/${jobId}
|
|
1403
|
+
const resp = await fetch(`${this.baseUrl}/projects/${this.projectId}/jobs/${jobId}`, {
|
|
1404
|
+
headers: {
|
|
1405
|
+
authorization: `Bearer ${this.accessToken}`
|
|
1406
|
+
}
|
|
1407
|
+
});
|
|
1381
1408
|
if (!resp.ok)
|
|
1382
1409
|
return null;
|
|
1383
1410
|
const response = await resp.json();
|
|
@@ -88403,9 +88430,9 @@ var require_braces = __commonJS({
|
|
|
88403
88430
|
}
|
|
88404
88431
|
});
|
|
88405
88432
|
|
|
88406
|
-
// ../../node_modules/picomatch/lib/constants.js
|
|
88433
|
+
// ../../node_modules/micromatch/node_modules/picomatch/lib/constants.js
|
|
88407
88434
|
var require_constants3 = __commonJS({
|
|
88408
|
-
"../../node_modules/picomatch/lib/constants.js"(exports2, module2) {
|
|
88435
|
+
"../../node_modules/micromatch/node_modules/picomatch/lib/constants.js"(exports2, module2) {
|
|
88409
88436
|
"use strict";
|
|
88410
88437
|
var path4 = require("path");
|
|
88411
88438
|
var WIN_SLASH = "\\\\/";
|
|
@@ -88600,9 +88627,9 @@ var require_constants3 = __commonJS({
|
|
|
88600
88627
|
}
|
|
88601
88628
|
});
|
|
88602
88629
|
|
|
88603
|
-
// ../../node_modules/picomatch/lib/utils.js
|
|
88630
|
+
// ../../node_modules/micromatch/node_modules/picomatch/lib/utils.js
|
|
88604
88631
|
var require_utils3 = __commonJS({
|
|
88605
|
-
"../../node_modules/picomatch/lib/utils.js"(exports2) {
|
|
88632
|
+
"../../node_modules/micromatch/node_modules/picomatch/lib/utils.js"(exports2) {
|
|
88606
88633
|
"use strict";
|
|
88607
88634
|
var path4 = require("path");
|
|
88608
88635
|
var win32 = process.platform === "win32";
|
|
@@ -88661,9 +88688,9 @@ var require_utils3 = __commonJS({
|
|
|
88661
88688
|
}
|
|
88662
88689
|
});
|
|
88663
88690
|
|
|
88664
|
-
// ../../node_modules/picomatch/lib/scan.js
|
|
88691
|
+
// ../../node_modules/micromatch/node_modules/picomatch/lib/scan.js
|
|
88665
88692
|
var require_scan = __commonJS({
|
|
88666
|
-
"../../node_modules/picomatch/lib/scan.js"(exports2, module2) {
|
|
88693
|
+
"../../node_modules/micromatch/node_modules/picomatch/lib/scan.js"(exports2, module2) {
|
|
88667
88694
|
"use strict";
|
|
88668
88695
|
var utils = require_utils3();
|
|
88669
88696
|
var {
|
|
@@ -88991,9 +89018,9 @@ var require_scan = __commonJS({
|
|
|
88991
89018
|
}
|
|
88992
89019
|
});
|
|
88993
89020
|
|
|
88994
|
-
// ../../node_modules/picomatch/lib/parse.js
|
|
89021
|
+
// ../../node_modules/micromatch/node_modules/picomatch/lib/parse.js
|
|
88995
89022
|
var require_parse6 = __commonJS({
|
|
88996
|
-
"../../node_modules/picomatch/lib/parse.js"(exports2, module2) {
|
|
89023
|
+
"../../node_modules/micromatch/node_modules/picomatch/lib/parse.js"(exports2, module2) {
|
|
88997
89024
|
"use strict";
|
|
88998
89025
|
var constants = require_constants3();
|
|
88999
89026
|
var utils = require_utils3();
|
|
@@ -89764,9 +89791,9 @@ var require_parse6 = __commonJS({
|
|
|
89764
89791
|
}
|
|
89765
89792
|
});
|
|
89766
89793
|
|
|
89767
|
-
// ../../node_modules/picomatch/lib/picomatch.js
|
|
89794
|
+
// ../../node_modules/micromatch/node_modules/picomatch/lib/picomatch.js
|
|
89768
89795
|
var require_picomatch = __commonJS({
|
|
89769
|
-
"../../node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
|
|
89796
|
+
"../../node_modules/micromatch/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
|
|
89770
89797
|
"use strict";
|
|
89771
89798
|
var path4 = require("path");
|
|
89772
89799
|
var scan = require_scan();
|
|
@@ -89905,9 +89932,9 @@ var require_picomatch = __commonJS({
|
|
|
89905
89932
|
}
|
|
89906
89933
|
});
|
|
89907
89934
|
|
|
89908
|
-
// ../../node_modules/picomatch/index.js
|
|
89935
|
+
// ../../node_modules/micromatch/node_modules/picomatch/index.js
|
|
89909
89936
|
var require_picomatch2 = __commonJS({
|
|
89910
|
-
"../../node_modules/picomatch/index.js"(exports2, module2) {
|
|
89937
|
+
"../../node_modules/micromatch/node_modules/picomatch/index.js"(exports2, module2) {
|
|
89911
89938
|
"use strict";
|
|
89912
89939
|
module2.exports = require_picomatch();
|
|
89913
89940
|
}
|
|
@@ -98959,7 +98986,7 @@ var require_extensionGenerators = __commonJS({
|
|
|
98959
98986
|
},
|
|
98960
98987
|
resources: {
|
|
98961
98988
|
client: {
|
|
98962
|
-
|
|
98989
|
+
componentUrl: componentPath
|
|
98963
98990
|
}
|
|
98964
98991
|
}
|
|
98965
98992
|
};
|
|
@@ -319718,7 +319745,7 @@ var require_extension = __commonJS({
|
|
|
319718
319745
|
case "customElement":
|
|
319719
319746
|
return config.element || null;
|
|
319720
319747
|
case "siteComponent":
|
|
319721
|
-
return config.resources?.client?.
|
|
319748
|
+
return config.resources?.client?.componentUrl || null;
|
|
319722
319749
|
case "embeddedScript":
|
|
319723
319750
|
case "ecomShippingRates":
|
|
319724
319751
|
case "ecomAdditionalFees":
|
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.215",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@wix/ditto-codegen": "1.0.0",
|
|
25
25
|
"esbuild": "^0.27.2"
|
|
26
26
|
},
|
|
27
|
-
"falconPackageHash": "
|
|
27
|
+
"falconPackageHash": "ace65706090875f9521bd8c519102b67981fea20212663ef2ede4c24"
|
|
28
28
|
}
|