@wix/ditto-codegen-public 1.0.449 → 1.0.450
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 +15 -4
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -11938,10 +11938,17 @@ skills or wix-mcp for SDK-shape errors; returns when the build is clean
|
|
|
11938
11938
|
or reports what it couldn't fix. Validation step only \u2014 never generates features.`;
|
|
11939
11939
|
var VALIDATOR_PROMPT = `Run 'validate({ runBuild: true })', fix the errors it reports, and re-run until
|
|
11940
11940
|
it passes. You are fixing EXISTING code \u2014 do NOT add features or rewrite whole
|
|
11941
|
-
files
|
|
11941
|
+
files, and do NOT run 'npx wix generate manifest' \u2014 that is the caller's step.
|
|
11942
|
+
NEVER force a green build by suppressing types: no 'as any', no
|
|
11942
11943
|
'@ts-ignore', no NEW '@ts-expect-error', and do NOT switch a correct named import to
|
|
11943
11944
|
'import * as' just to satisfy tsc \u2014 that ships code that compiles but breaks
|
|
11944
|
-
at runtime.
|
|
11945
|
+
at runtime. Just as forbidden is satisfying tsc by CHANGING RUNTIME BEHAVIOUR:
|
|
11946
|
+
do not add values to 'defaultProps' the component should not default (an empty
|
|
11947
|
+
'id' or 'className' is a behaviour change, not a fix), and do not weaken a
|
|
11948
|
+
constraint into a no-op ('Omit<T, never>' is just 'T'). When a type error means
|
|
11949
|
+
the shape a skill taught does not match the real exported type, fix the code to
|
|
11950
|
+
the real type and report the mismatch.
|
|
11951
|
+
Leave an EXISTING '@ts-expect-error' alone when a skill mandates it
|
|
11945
11952
|
(e.g. a context provider's 'moduleSpecifier' import); removing it is not a fix.
|
|
11946
11953
|
A type error on a Wix SDK method/namespace/parameter means the call is WRONG: look up the correct
|
|
11947
11954
|
usage via skills or wix-mcp ('SearchWixSDKDocumentation' \u2192
|
|
@@ -15572,7 +15579,7 @@ IMPLEMENTATION WORKFLOW:
|
|
|
15572
15579
|
2. **Research**: Load the \`wix-app\` skill per extension type. SKIP this step entirely if the skill + KNOWN WIX APIS cover everything (common for dashboard + data-collection apps). Otherwise delegate ONLY to search for an API you genuinely can't identify \u2014 \`codegen-wix-docs\` (SDK), \`codegen-wds-docs\` (WDS), both in ONE response if both needed; pass each the question, not a known doc link \u2014 and wait for the summaries before building.
|
|
15573
15580
|
3. **Build**: Write files incrementally \u2014 group by logical section, NOT all at once. For complex tasks (300+ total lines across files), split into multiple \`batch-write\` calls. NEVER hold back writing until all code is planned \u2014 write each logical piece as soon as it is ready. Build all extensions before registering.
|
|
15574
15581
|
4. **Register**: Register all extensions in \`src/extensions.ts\`.
|
|
15575
|
-
5. **Validate**: Dispatch ONE \`task({ subagent: "codegen-validator", prompt: "Run validate({ runBuild: true }) \u2014 it typechecks AND builds in a single pass (tsc runs first and fails fast before the build). Fix any errors and re-run until it passes. Pass installDeps: true only if package.json changed and npm install was not already run in this session." })\`. Wait for the subagent to return. Do NOT call \`validate\` directly from the primary agent, and do NOT make a separate tsc-only call first \u2014 the single runBuild pass already fails fast on type errors. VERIFY the subagent actually FINISHED with a clean build: read its returned summary and confirm it converged. If it reports remaining/unresolved errors or was cut off before finishing (e.g. "Maximum steps reached"), do NOT treat it as success \u2014 re-dispatch \`codegen-validator\` to finish the remaining errors before moving on. After the validator confirms a clean build, if you created or modified an EDITOR_REACT_COMPONENT extension in this task, run \`npx wix generate manifest\` via bash (
|
|
15582
|
+
5. **Validate**: Dispatch ONE \`task({ subagent: "codegen-validator", prompt: "Run validate({ runBuild: true }) \u2014 it typechecks AND builds in a single pass (tsc runs first and fails fast before the build). Fix any errors and re-run until it passes. Pass installDeps: true only if package.json changed and npm install was not already run in this session." })\`. Wait for the subagent to return. Do NOT call \`validate\` directly from the primary agent, and do NOT make a separate tsc-only call first \u2014 the single runBuild pass already fails fast on type errors. VERIFY the subagent actually FINISHED with a clean build: read its returned summary and confirm it converged. If it reports remaining/unresolved errors or was cut off before finishing (e.g. "Maximum steps reached"), do NOT treat it as success \u2014 re-dispatch \`codegen-validator\` to finish the remaining errors before moving on. After the validator confirms a clean build, if you created or modified an EDITOR_REACT_COMPONENT extension in this task, run \`npx wix generate manifest\` via bash (the validator is instructed not to run it, so this is the only run).
|
|
15576
15583
|
6. **Declare permissions**: If the generated code requires Wix app permissions, call \`required-permissions\` ONCE with their SCOPE IDs (see PERMISSIONS below). Skip this step entirely if no permissions are needed.
|
|
15577
15584
|
7. **Final message**: Your last message is returned to the user as the codegen output \u2014 keep it short and plain (a sentence or two on what the app now does). Do NOT mention permissions/scopes here (see PERMISSIONS) and follow OUTPUT MESSAGE below.
|
|
15578
15585
|
8. **Stop**: STOP immediately. Do NOT refactor, clean up, or verify.
|
|
@@ -15582,6 +15589,10 @@ FILE CREATION:
|
|
|
15582
15589
|
- Keep each file under 200 lines. Split into types.ts, utils.ts if needed.
|
|
15583
15590
|
- Do NOT output comments in code unless they explain non-obvious logic.
|
|
15584
15591
|
|
|
15592
|
+
GENERATED FILES:
|
|
15593
|
+
- \`src/extensions/site/components/**/*.generated.ts\` is an auto-generated editor-react-component manifest \u2014 NEVER hand-edit. Change a manifest VALUE in the component's \`*.extension.ts\`; change anything else in the \`*.tsx\` / \`*.module.css\` / \`*.props.ts\` source, then regenerate (workflow step 5). No other \`.generated.ts\` path is affected.
|
|
15594
|
+
- A write guard rejects \`write\`/\`edit\`/\`batch-write\`/\`multi-edit\` there, dropping the ENTIRE call \u2014 never batch that path with real edits, or those are lost too and must be resubmitted.
|
|
15595
|
+
|
|
15585
15596
|
TYPESCRIPT:
|
|
15586
15597
|
- The project enables \`verbatimModuleSyntax\`. Type-only imports MUST use \`import type\`.
|
|
15587
15598
|
|
|
@@ -24517,7 +24528,7 @@ var require_generated_files_guard = __commonJS({
|
|
|
24517
24528
|
exports2.writeGeneratedFilesGuardPlugin = writeGeneratedFilesGuardPlugin;
|
|
24518
24529
|
var generated_plugins_1 = require_generated_plugins();
|
|
24519
24530
|
var ERC_MANIFEST_RE = /(^|\/)src\/extensions\/site\/components\/.+\.generated\.tsx?$/;
|
|
24520
|
-
exports2.GUARD_MESSAGE = "BLOCKED:
|
|
24531
|
+
exports2.GUARD_MESSAGE = "BLOCKED: this editor-react-component manifest is auto-generated. Do not create or edit it by hand \u2014 edit the *.tsx / *.module.css / *.props.ts source and regenerate with `npx wix build && npx wix generate manifest`, or override values in the component's *.extension.ts. Do not re-attempt the blocked path; the whole call was rejected, so resubmit any other paths it carried \u2014 they were not written. Only *.generated.ts under src/extensions/site/components/ is blocked.";
|
|
24521
24532
|
function isEditorComponentManifest(path) {
|
|
24522
24533
|
return ERC_MANIFEST_RE.test(path);
|
|
24523
24534
|
}
|
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.450",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"esbuild": "^0.27.2",
|
|
30
30
|
"vitest": "^4.0.16"
|
|
31
31
|
},
|
|
32
|
-
"falconPackageHash": "
|
|
32
|
+
"falconPackageHash": "aad01f2edbf17040d46676c57f7067a74d44ee6df2af105d575f65b2"
|
|
33
33
|
}
|