@wix/ditto-codegen-public 1.0.326 → 1.0.327
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/opencode-tools/validate.ts +22 -3
- package/dist/out.js +1 -1
- package/package.json +2 -2
|
@@ -2,14 +2,25 @@ import { tool } from "@opencode-ai/plugin";
|
|
|
2
2
|
|
|
3
3
|
export default tool({
|
|
4
4
|
description:
|
|
5
|
-
"Run
|
|
5
|
+
"Run project validation: TypeScript check by default, optionally a full build. " +
|
|
6
6
|
"Use this instead of running npm install, tsc, and wix build separately.",
|
|
7
7
|
args: {
|
|
8
8
|
installDeps: tool.schema
|
|
9
9
|
.boolean()
|
|
10
10
|
.optional()
|
|
11
11
|
.describe(
|
|
12
|
-
"
|
|
12
|
+
"Default false. Only set true when package.json changed in this iteration " +
|
|
13
|
+
"(added, removed, or upgraded a dependency). node_modules is pre-populated " +
|
|
14
|
+
"in the image, so installs are unnecessary otherwise.",
|
|
15
|
+
),
|
|
16
|
+
runBuild: tool.schema
|
|
17
|
+
.boolean()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe(
|
|
20
|
+
"Default false. Set true ONLY on the final validation pass after tsc " +
|
|
21
|
+
"succeeds to run `wix build` and verify the project builds end-to-end. " +
|
|
22
|
+
"`wix build` is slow (~20s); omitting it on intermediate iterations keeps " +
|
|
23
|
+
"the edit-validate loop fast.",
|
|
13
24
|
),
|
|
14
25
|
},
|
|
15
26
|
async execute(args, context) {
|
|
@@ -17,7 +28,10 @@ export default tool({
|
|
|
17
28
|
const cwd = context.directory;
|
|
18
29
|
|
|
19
30
|
if (args.installDeps) {
|
|
20
|
-
const install = await Bun.$`npm install
|
|
31
|
+
const install = await Bun.$`npm install --no-audit --no-fund`
|
|
32
|
+
.cwd(cwd)
|
|
33
|
+
.nothrow()
|
|
34
|
+
.quiet();
|
|
21
35
|
if (install.exitCode !== 0) {
|
|
22
36
|
return `FAILED at npm install (exit ${install.exitCode}):\n${install.stderr.toString()}`;
|
|
23
37
|
}
|
|
@@ -35,6 +49,11 @@ export default tool({
|
|
|
35
49
|
}
|
|
36
50
|
steps.push("tsc --noEmit: OK");
|
|
37
51
|
|
|
52
|
+
if (!args.runBuild) {
|
|
53
|
+
steps.push("wix build: skipped (pass runBuild: true to verify build)");
|
|
54
|
+
return steps.join("\n");
|
|
55
|
+
}
|
|
56
|
+
|
|
38
57
|
const build = await Bun.$`npx wix build`.cwd(cwd).nothrow().quiet();
|
|
39
58
|
if (build.exitCode !== 0) {
|
|
40
59
|
return [
|
package/dist/out.js
CHANGED
|
@@ -11878,7 +11878,7 @@ IMPLEMENTATION WORKFLOW:
|
|
|
11878
11878
|
1. **Plan**: Determine extension types using the \`wix-app\` skill. Generate ALL UUIDs upfront.
|
|
11879
11879
|
2. **Build**: Create each extension using \`batch-write\`. Build all extensions before registering.
|
|
11880
11880
|
3. **Register**: Register all extensions in \`src/extensions.ts\`.
|
|
11881
|
-
4. **Validate**: Run \`validate\`
|
|
11881
|
+
4. **Validate**: Run \`validate\` (typecheck only). Fix any errors and re-validate until tsc passes. Then run \`validate({ runBuild: true })\` ONCE to verify the build. Pass \`installDeps: true\` ONLY when you added a new dependency to package.json in this iteration; otherwise omit it (node_modules is pre-installed).
|
|
11882
11882
|
5. **Stop**: Once validation passes, STOP. Do NOT refactor, clean up, or verify.
|
|
11883
11883
|
|
|
11884
11884
|
EFFICIENCY:
|
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.327",
|
|
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": "9a805eff0a678722d7889d0105313ad61c44e1c48cbc5d1ec0009099"
|
|
32
32
|
}
|