@wix/ditto-codegen-public 1.0.21 → 1.0.23
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 +31 -1
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -74903,6 +74903,35 @@ 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
|
+
|
|
74906
74935
|
// dist/context.js
|
|
74907
74936
|
var require_context = __commonJS({
|
|
74908
74937
|
"dist/context.js"(exports2) {
|
|
@@ -74915,6 +74944,7 @@ var require_context = __commonJS({
|
|
|
74915
74944
|
var CodeGenService_1 = require_CodeGenService();
|
|
74916
74945
|
var dotenv_1 = __importDefault2(require_main());
|
|
74917
74946
|
var path_1 = __importDefault2(require("path"));
|
|
74947
|
+
var read_access_token_from_dev_machine_1 = require_read_access_token_from_dev_machine();
|
|
74918
74948
|
dotenv_1.default.config({ path: path_1.default.join(__dirname, "../.env"), override: true });
|
|
74919
74949
|
var HistoryManager = class {
|
|
74920
74950
|
constructor() {
|
|
@@ -74939,7 +74969,7 @@ var require_context = __commonJS({
|
|
|
74939
74969
|
projectId: process.env.PROJECT_ID || "test",
|
|
74940
74970
|
apiKey: process.env.ANTHROPIC_API_KEY,
|
|
74941
74971
|
siteId: process.env.SITE_ID,
|
|
74942
|
-
accessToken: process.env.ACCESS_TOKEN,
|
|
74972
|
+
accessToken: (0, read_access_token_from_dev_machine_1.readAccessTokenFromDevMachine)() || process.env.ACCESS_TOKEN,
|
|
74943
74973
|
hasActiveJobs: () => {
|
|
74944
74974
|
return Object.keys(exports2.ctx.activeJobs).some((jobId) => exports2.ctx.activeJobs[jobId] === CodeGenService_1.TaskStatus.RUNNING);
|
|
74945
74975
|
},
|
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.23",
|
|
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": "ba901ecd25e1f5ba676d86ace263f2cd70a00e1ffc99a22d366c2cbd"
|
|
28
28
|
}
|