@wix/ditto-codegen-public 1.0.23 → 1.0.25
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 +12 -41
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -74358,13 +74358,13 @@ var require_instrumentation3 = __commonJS({
|
|
|
74358
74358
|
constructor(id) {
|
|
74359
74359
|
this.id = id;
|
|
74360
74360
|
}
|
|
74361
|
-
onStart(span
|
|
74361
|
+
onStart(span) {
|
|
74362
74362
|
try {
|
|
74363
|
-
span.setAttribute
|
|
74363
|
+
span.setAttribute?.("session.id", this.id);
|
|
74364
74364
|
} catch {
|
|
74365
74365
|
}
|
|
74366
74366
|
}
|
|
74367
|
-
onEnd(
|
|
74367
|
+
onEnd() {
|
|
74368
74368
|
}
|
|
74369
74369
|
shutdown() {
|
|
74370
74370
|
return Promise.resolve();
|
|
@@ -74903,35 +74903,6 @@ var require_main = __commonJS({
|
|
|
74903
74903
|
}
|
|
74904
74904
|
});
|
|
74905
74905
|
|
|
74906
|
-
// dist/read-access-token-from-dev-machine.js
|
|
74907
|
-
var require_read_access_token_from_dev_machine = __commonJS({
|
|
74908
|
-
"dist/read-access-token-from-dev-machine.js"(exports2) {
|
|
74909
|
-
"use strict";
|
|
74910
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
74911
|
-
exports2.readAccessTokenFromDevMachine = readAccessTokenFromDevMachine;
|
|
74912
|
-
var fs_1 = require("fs");
|
|
74913
|
-
function readAccessTokenFromDevMachine() {
|
|
74914
|
-
const authFilePath = "/root/.wix/auth/api-key.json";
|
|
74915
|
-
if (!(0, fs_1.existsSync)(authFilePath)) {
|
|
74916
|
-
console.warn(`\u26A0\uFE0F ${authFilePath} doesn't exist so can't use it to get access token`);
|
|
74917
|
-
return void 0;
|
|
74918
|
-
}
|
|
74919
|
-
try {
|
|
74920
|
-
const fileContent = (0, fs_1.readFileSync)(authFilePath, "utf8");
|
|
74921
|
-
const authData = JSON.parse(fileContent);
|
|
74922
|
-
if (typeof authData.token === "string") {
|
|
74923
|
-
return authData.token;
|
|
74924
|
-
}
|
|
74925
|
-
console.warn(`\u26A0\uFE0F ${authFilePath} doesn't contain the auth token property`);
|
|
74926
|
-
return void 0;
|
|
74927
|
-
} catch (error) {
|
|
74928
|
-
console.warn(`\u26A0\uFE0F ${authFilePath} isn't found or isn't parseable`);
|
|
74929
|
-
return void 0;
|
|
74930
|
-
}
|
|
74931
|
-
}
|
|
74932
|
-
}
|
|
74933
|
-
});
|
|
74934
|
-
|
|
74935
74906
|
// dist/context.js
|
|
74936
74907
|
var require_context = __commonJS({
|
|
74937
74908
|
"dist/context.js"(exports2) {
|
|
@@ -74944,7 +74915,6 @@ var require_context = __commonJS({
|
|
|
74944
74915
|
var CodeGenService_1 = require_CodeGenService();
|
|
74945
74916
|
var dotenv_1 = __importDefault2(require_main());
|
|
74946
74917
|
var path_1 = __importDefault2(require("path"));
|
|
74947
|
-
var read_access_token_from_dev_machine_1 = require_read_access_token_from_dev_machine();
|
|
74948
74918
|
dotenv_1.default.config({ path: path_1.default.join(__dirname, "../.env"), override: true });
|
|
74949
74919
|
var HistoryManager = class {
|
|
74950
74920
|
constructor() {
|
|
@@ -74959,7 +74929,7 @@ var require_context = __commonJS({
|
|
|
74959
74929
|
clear() {
|
|
74960
74930
|
this.history = [];
|
|
74961
74931
|
}
|
|
74962
|
-
async init(
|
|
74932
|
+
async init() {
|
|
74963
74933
|
this.history = [];
|
|
74964
74934
|
}
|
|
74965
74935
|
};
|
|
@@ -74969,7 +74939,7 @@ var require_context = __commonJS({
|
|
|
74969
74939
|
projectId: process.env.PROJECT_ID || "test",
|
|
74970
74940
|
apiKey: process.env.ANTHROPIC_API_KEY,
|
|
74971
74941
|
siteId: process.env.SITE_ID,
|
|
74972
|
-
accessToken:
|
|
74942
|
+
accessToken: process.env.ACCESS_TOKEN,
|
|
74973
74943
|
hasActiveJobs: () => {
|
|
74974
74944
|
return Object.keys(exports2.ctx.activeJobs).some((jobId) => exports2.ctx.activeJobs[jobId] === CodeGenService_1.TaskStatus.RUNNING);
|
|
74975
74945
|
},
|
|
@@ -74982,8 +74952,8 @@ var require_context = __commonJS({
|
|
|
74982
74952
|
}
|
|
74983
74953
|
}
|
|
74984
74954
|
});
|
|
74985
|
-
var initCtx = async (
|
|
74986
|
-
await exports2.ctx.history.init(
|
|
74955
|
+
var initCtx = async () => {
|
|
74956
|
+
await exports2.ctx.history.init();
|
|
74987
74957
|
return exports2.ctx;
|
|
74988
74958
|
};
|
|
74989
74959
|
exports2.initCtx = initCtx;
|
|
@@ -120400,7 +120370,7 @@ var require_orchestrator = __commonJS({
|
|
|
120400
120370
|
}
|
|
120401
120371
|
const fullPath = path_1.default.join(outputPath, file.path);
|
|
120402
120372
|
switch (file.operation) {
|
|
120403
|
-
case "insert":
|
|
120373
|
+
case "insert": {
|
|
120404
120374
|
if (!file.content) {
|
|
120405
120375
|
console.warn(`\u26A0\uFE0F Skipping insert operation for ${file.path}: no content provided`);
|
|
120406
120376
|
continue;
|
|
@@ -120412,6 +120382,7 @@ var require_orchestrator = __commonJS({
|
|
|
120412
120382
|
fs_1.default.writeFileSync(fullPath, file.content.trim());
|
|
120413
120383
|
console.log(`\u{1F4DD} Inserted: ${file.path}`);
|
|
120414
120384
|
break;
|
|
120385
|
+
}
|
|
120415
120386
|
case "update":
|
|
120416
120387
|
if (!file.content) {
|
|
120417
120388
|
console.warn(`\u26A0\uFE0F Skipping update operation for ${file.path}: no content provided`);
|
|
@@ -120734,7 +120705,7 @@ var require_utils18 = __commonJS({
|
|
|
120734
120705
|
if (!(key in base)) {
|
|
120735
120706
|
try {
|
|
120736
120707
|
base[key] = anyErr[key];
|
|
120737
|
-
} catch
|
|
120708
|
+
} catch {
|
|
120738
120709
|
}
|
|
120739
120710
|
}
|
|
120740
120711
|
}
|
|
@@ -120754,7 +120725,7 @@ var require_utils18 = __commonJS({
|
|
|
120754
120725
|
if (typeof error === "object" && error !== null) {
|
|
120755
120726
|
try {
|
|
120756
120727
|
return JSON.parse(JSON.stringify(error));
|
|
120757
|
-
} catch
|
|
120728
|
+
} catch {
|
|
120758
120729
|
return { message: String(error) };
|
|
120759
120730
|
}
|
|
120760
120731
|
}
|
|
@@ -121013,7 +120984,7 @@ var require_index = __commonJS({
|
|
|
121013
120984
|
}
|
|
121014
120985
|
});
|
|
121015
120986
|
}
|
|
121016
|
-
(0, context_1.initCtx)(
|
|
120987
|
+
(0, context_1.initCtx)().then((ctx) => {
|
|
121017
120988
|
main(ctx);
|
|
121018
120989
|
});
|
|
121019
120990
|
}
|
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.25",
|
|
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.25.9"
|
|
26
26
|
},
|
|
27
|
-
"falconPackageHash": "
|
|
27
|
+
"falconPackageHash": "b24ba6efefd8a795997f4dd6ac5911e420fa23dab8f81d70ad141f64"
|
|
28
28
|
}
|