@wix/ditto-codegen-public 1.0.345 → 1.0.346
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 +32 -33
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -12662,6 +12662,19 @@ var require_types4 = __commonJS({
|
|
|
12662
12662
|
}
|
|
12663
12663
|
});
|
|
12664
12664
|
|
|
12665
|
+
// dist/opencode-integration/internal-paths.js
|
|
12666
|
+
var require_internal_paths = __commonJS({
|
|
12667
|
+
"dist/opencode-integration/internal-paths.js"(exports2) {
|
|
12668
|
+
"use strict";
|
|
12669
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12670
|
+
exports2.isInternalPath = isInternalPath;
|
|
12671
|
+
var INTERNAL_PATH_PREFIXES = [".agents/"];
|
|
12672
|
+
function isInternalPath(path) {
|
|
12673
|
+
return INTERNAL_PATH_PREFIXES.some((prefix) => path.startsWith(prefix));
|
|
12674
|
+
}
|
|
12675
|
+
}
|
|
12676
|
+
});
|
|
12677
|
+
|
|
12665
12678
|
// dist/opencode-integration/parser.js
|
|
12666
12679
|
var require_parser = __commonJS({
|
|
12667
12680
|
"dist/opencode-integration/parser.js"(exports2) {
|
|
@@ -12678,6 +12691,7 @@ var require_parser = __commonJS({
|
|
|
12678
12691
|
var ditto_codegen_types_12 = require_dist4();
|
|
12679
12692
|
var types_1 = require_types4();
|
|
12680
12693
|
var constants_1 = require_constants5();
|
|
12694
|
+
var internal_paths_1 = require_internal_paths();
|
|
12681
12695
|
function parseEvents(output, type) {
|
|
12682
12696
|
return output.split("\n").filter((line) => line.trim()).map((line) => (0, types_1.tryParseJson)(line)).filter((event) => event !== null && event.type === type);
|
|
12683
12697
|
}
|
|
@@ -12708,7 +12722,7 @@ var require_parser = __commonJS({
|
|
|
12708
12722
|
const seenPaths = /* @__PURE__ */ new Set();
|
|
12709
12723
|
const addFileChange = (filePath, operation) => {
|
|
12710
12724
|
const normalizedPath = (0, constants_1.normalizeFilePath)(filePath);
|
|
12711
|
-
if (normalizedPath && !seenPaths.has(normalizedPath)) {
|
|
12725
|
+
if (normalizedPath && !(0, internal_paths_1.isInternalPath)(normalizedPath) && !seenPaths.has(normalizedPath)) {
|
|
12712
12726
|
seenPaths.add(normalizedPath);
|
|
12713
12727
|
filesChanged.push({ path: normalizedPath, operation });
|
|
12714
12728
|
}
|
|
@@ -13672,6 +13686,7 @@ var require_git_file_changes = __commonJS({
|
|
|
13672
13686
|
var child_process_1 = require("child_process");
|
|
13673
13687
|
var util_1 = require("util");
|
|
13674
13688
|
var ditto_codegen_types_12 = require_dist4();
|
|
13689
|
+
var internal_paths_1 = require_internal_paths();
|
|
13675
13690
|
var logger_12 = require_logger();
|
|
13676
13691
|
var execFileAsync = (0, util_1.promisify)(child_process_1.execFile);
|
|
13677
13692
|
async function captureGitBaseline(cwd) {
|
|
@@ -13694,8 +13709,9 @@ var require_git_file_changes = __commonJS({
|
|
|
13694
13709
|
]);
|
|
13695
13710
|
const files = parseDiffNameStatus(diffResult.stdout);
|
|
13696
13711
|
appendUntrackedFiles(untrackedResult.stdout, files);
|
|
13697
|
-
files.
|
|
13698
|
-
|
|
13712
|
+
const userFiles = files.filter((f) => !(0, internal_paths_1.isInternalPath)(f.path));
|
|
13713
|
+
userFiles.sort((a, b) => a.path.localeCompare(b.path));
|
|
13714
|
+
return userFiles;
|
|
13699
13715
|
} catch (error) {
|
|
13700
13716
|
logger_12.logger.error("[OpenCode] Failed to collect git file changes", {
|
|
13701
13717
|
error: error instanceof Error ? error.message : String(error)
|
|
@@ -19423,16 +19439,17 @@ var require_skills_installer = __commonJS({
|
|
|
19423
19439
|
"use strict";
|
|
19424
19440
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19425
19441
|
exports2.installSkills = installSkills;
|
|
19426
|
-
var child_process_1 = require("child_process");
|
|
19427
19442
|
var fs_1 = require("fs");
|
|
19428
|
-
var
|
|
19443
|
+
var path_1 = require("path");
|
|
19429
19444
|
var ditto_codegen_types_12 = require_dist4();
|
|
19430
19445
|
var skills_override_1 = require_skills_override();
|
|
19431
|
-
|
|
19432
|
-
|
|
19446
|
+
function hasSkills(dir) {
|
|
19447
|
+
return (0, fs_1.existsSync)(dir) && (0, fs_1.readdirSync)(dir).length > 0;
|
|
19448
|
+
}
|
|
19433
19449
|
async function installSkills(outputPath, log) {
|
|
19434
19450
|
const skillsOverride = process.env.SKILLS_OVERRIDE_BRANCH;
|
|
19435
|
-
const
|
|
19451
|
+
const projectSkillsDir = (0, path_1.join)(outputPath, ".agents", "skills");
|
|
19452
|
+
const isPreInstalled = hasSkills(skills_override_1.SKILLS_DIR) || hasSkills(projectSkillsDir);
|
|
19436
19453
|
if (isPreInstalled && !skillsOverride) {
|
|
19437
19454
|
log.info("[Skills] Skipping runtime skills installation (pre-installed via Docker image)", { environment: process.env.CODEGEN_ENVIRONMENT });
|
|
19438
19455
|
return;
|
|
@@ -19443,35 +19460,17 @@ var require_skills_installer = __commonJS({
|
|
|
19443
19460
|
await (0, skills_override_1.overrideSkills)(overrides, outputPath, log);
|
|
19444
19461
|
return;
|
|
19445
19462
|
} catch (error) {
|
|
19446
|
-
if (isPreInstalled) {
|
|
19447
|
-
throw new ditto_codegen_types_12.ProcessExecutionError("Failed to override pre-installed skills", { processType: ditto_codegen_types_12.ProcessType.INITIALIZATION, cause: error });
|
|
19448
|
-
}
|
|
19449
19463
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
19450
|
-
log.
|
|
19451
|
-
|
|
19452
|
-
});
|
|
19464
|
+
log.error("[Skills] Branch override failed", { error: errorMessage });
|
|
19465
|
+
throw new ditto_codegen_types_12.ProcessExecutionError(isPreInstalled ? "Failed to override pre-installed skills" : "Skills override failed and no pre-installed skills available", { processType: ditto_codegen_types_12.ProcessType.INITIALIZATION, cause: error });
|
|
19453
19466
|
}
|
|
19454
19467
|
}
|
|
19455
|
-
log.
|
|
19456
|
-
|
|
19468
|
+
log.error("[Skills] No skills available \u2014 pre-install missing and no override", {
|
|
19469
|
+
globalSkillsDir: skills_override_1.SKILLS_DIR,
|
|
19470
|
+
projectSkillsDir,
|
|
19471
|
+
environment: process.env.CODEGEN_ENVIRONMENT
|
|
19457
19472
|
});
|
|
19458
|
-
|
|
19459
|
-
const { stdout, stderr } = await execAsync(SKILLS_INSTALL_COMMAND, {
|
|
19460
|
-
cwd: outputPath
|
|
19461
|
-
});
|
|
19462
|
-
if (stderr && !stderr.includes("npm warn")) {
|
|
19463
|
-
log.warn("[Skills] Installation stderr", { stderr });
|
|
19464
|
-
}
|
|
19465
|
-
console.log("[Skills] Skills installed successfully\n", stdout);
|
|
19466
|
-
log.debug("[Skills] Skills installed successfully", { stdout });
|
|
19467
|
-
} catch (error) {
|
|
19468
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
19469
|
-
log.error("[Skills] Failed to install skills", { error: errorMessage });
|
|
19470
|
-
throw new ditto_codegen_types_12.ProcessExecutionError("Failed to install Wix skills", {
|
|
19471
|
-
processType: ditto_codegen_types_12.ProcessType.INITIALIZATION,
|
|
19472
|
-
cause: error
|
|
19473
|
-
});
|
|
19474
|
-
}
|
|
19473
|
+
throw new ditto_codegen_types_12.ProcessExecutionError("Skills not pre-installed and no SKILLS_OVERRIDE_BRANCH set \u2014 verify the Docker image bake-time install ran successfully.", { processType: ditto_codegen_types_12.ProcessType.INITIALIZATION });
|
|
19475
19474
|
}
|
|
19476
19475
|
}
|
|
19477
19476
|
});
|
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.346",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"esbuild": "^0.27.2",
|
|
29
29
|
"vitest": "^4.0.16"
|
|
30
30
|
},
|
|
31
|
-
"falconPackageHash": "
|
|
31
|
+
"falconPackageHash": "047a675018b94994c57488b7355d11a71cc4b88ce204e78bcfe23597"
|
|
32
32
|
}
|