@wix/ditto-codegen-public 1.0.449 → 1.0.451
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 -14
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -11087,6 +11087,20 @@ var require_CodeGenService = __commonJS({
|
|
|
11087
11087
|
..."stderr" in error && { stderr: error.stderr }
|
|
11088
11088
|
};
|
|
11089
11089
|
}
|
|
11090
|
+
function toApiExtension(ext) {
|
|
11091
|
+
return {
|
|
11092
|
+
path: ext.path,
|
|
11093
|
+
extensionType: ext.extensionType,
|
|
11094
|
+
title: ext.title,
|
|
11095
|
+
isSpi: ext.isSpi,
|
|
11096
|
+
routePath: ext.routePath,
|
|
11097
|
+
id: ext.id,
|
|
11098
|
+
files: ext.files.map((f) => ({
|
|
11099
|
+
path: f.path,
|
|
11100
|
+
operation: FILE_OPERATION[f.operation] ?? types_1.FileOperation.UNKNOWN_FILE_OPERATION
|
|
11101
|
+
}))
|
|
11102
|
+
};
|
|
11103
|
+
}
|
|
11090
11104
|
function toJobOutput(payload) {
|
|
11091
11105
|
const { requiredPermissions, files, extensions, error, agentMessage, ...rest } = payload;
|
|
11092
11106
|
return {
|
|
@@ -11095,16 +11109,8 @@ var require_CodeGenService = __commonJS({
|
|
|
11095
11109
|
path: file.path,
|
|
11096
11110
|
operation: FILE_OPERATION[file.operation] ?? types_1.FileOperation.UNKNOWN_FILE_OPERATION
|
|
11097
11111
|
})),
|
|
11098
|
-
|
|
11099
|
-
|
|
11100
|
-
extensionType: ext.extensionType,
|
|
11101
|
-
title: ext.title,
|
|
11102
|
-
isSpi: ext.isSpi,
|
|
11103
|
-
files: ext.files.map((f) => ({
|
|
11104
|
-
path: f.path,
|
|
11105
|
-
operation: FILE_OPERATION[f.operation] ?? types_1.FileOperation.UNKNOWN_FILE_OPERATION
|
|
11106
|
-
}))
|
|
11107
|
-
})),
|
|
11112
|
+
extensionsCreated: extensions?.created?.map(toApiExtension),
|
|
11113
|
+
extensionsUpdated: extensions?.updated?.map(toApiExtension),
|
|
11108
11114
|
error: toApiError(error),
|
|
11109
11115
|
agentMessage,
|
|
11110
11116
|
agentOutput: Object.keys(rest).length > 0 ? rest : void 0
|
|
@@ -11938,10 +11944,17 @@ skills or wix-mcp for SDK-shape errors; returns when the build is clean
|
|
|
11938
11944
|
or reports what it couldn't fix. Validation step only \u2014 never generates features.`;
|
|
11939
11945
|
var VALIDATOR_PROMPT = `Run 'validate({ runBuild: true })', fix the errors it reports, and re-run until
|
|
11940
11946
|
it passes. You are fixing EXISTING code \u2014 do NOT add features or rewrite whole
|
|
11941
|
-
files
|
|
11947
|
+
files, and do NOT run 'npx wix generate manifest' \u2014 that is the caller's step.
|
|
11948
|
+
NEVER force a green build by suppressing types: no 'as any', no
|
|
11942
11949
|
'@ts-ignore', no NEW '@ts-expect-error', and do NOT switch a correct named import to
|
|
11943
11950
|
'import * as' just to satisfy tsc \u2014 that ships code that compiles but breaks
|
|
11944
|
-
at runtime.
|
|
11951
|
+
at runtime. Just as forbidden is satisfying tsc by CHANGING RUNTIME BEHAVIOUR:
|
|
11952
|
+
do not add values to 'defaultProps' the component should not default (an empty
|
|
11953
|
+
'id' or 'className' is a behaviour change, not a fix), and do not weaken a
|
|
11954
|
+
constraint into a no-op ('Omit<T, never>' is just 'T'). When a type error means
|
|
11955
|
+
the shape a skill taught does not match the real exported type, fix the code to
|
|
11956
|
+
the real type and report the mismatch.
|
|
11957
|
+
Leave an EXISTING '@ts-expect-error' alone when a skill mandates it
|
|
11945
11958
|
(e.g. a context provider's 'moduleSpecifier' import); removing it is not a fix.
|
|
11946
11959
|
A type error on a Wix SDK method/namespace/parameter means the call is WRONG: look up the correct
|
|
11947
11960
|
usage via skills or wix-mcp ('SearchWixSDKDocumentation' \u2192
|
|
@@ -15572,7 +15585,7 @@ IMPLEMENTATION WORKFLOW:
|
|
|
15572
15585
|
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
15586
|
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
15587
|
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 (
|
|
15588
|
+
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
15589
|
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
15590
|
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
15591
|
8. **Stop**: STOP immediately. Do NOT refactor, clean up, or verify.
|
|
@@ -15582,6 +15595,10 @@ FILE CREATION:
|
|
|
15582
15595
|
- Keep each file under 200 lines. Split into types.ts, utils.ts if needed.
|
|
15583
15596
|
- Do NOT output comments in code unless they explain non-obvious logic.
|
|
15584
15597
|
|
|
15598
|
+
GENERATED FILES:
|
|
15599
|
+
- \`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.
|
|
15600
|
+
- 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.
|
|
15601
|
+
|
|
15585
15602
|
TYPESCRIPT:
|
|
15586
15603
|
- The project enables \`verbatimModuleSyntax\`. Type-only imports MUST use \`import type\`.
|
|
15587
15604
|
|
|
@@ -24517,7 +24534,7 @@ var require_generated_files_guard = __commonJS({
|
|
|
24517
24534
|
exports2.writeGeneratedFilesGuardPlugin = writeGeneratedFilesGuardPlugin;
|
|
24518
24535
|
var generated_plugins_1 = require_generated_plugins();
|
|
24519
24536
|
var ERC_MANIFEST_RE = /(^|\/)src\/extensions\/site\/components\/.+\.generated\.tsx?$/;
|
|
24520
|
-
exports2.GUARD_MESSAGE = "BLOCKED:
|
|
24537
|
+
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
24538
|
function isEditorComponentManifest(path) {
|
|
24522
24539
|
return ERC_MANIFEST_RE.test(path);
|
|
24523
24540
|
}
|
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.451",
|
|
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": "f3792095ab8a117580890ff1768aba2d3852725b9003a2d6fd4a7ff1"
|
|
33
33
|
}
|