@wix/ditto-codegen-public 1.0.10 → 1.0.11
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 +40 -2
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -115326,6 +115326,40 @@ ${ecomPackage_1.ecomPackage}
|
|
|
115326
115326
|
<wds_reference>
|
|
115327
115327
|
${wdsPrompt}
|
|
115328
115328
|
</wds_reference>
|
|
115329
|
+
|
|
115330
|
+
<typescript_quality_guidelines>
|
|
115331
|
+
- Generated code MUST compile with zero TypeScript errors under strict settings:
|
|
115332
|
+
strict, noImplicitAny, strictNullChecks, exactOptionalPropertyTypes, noUncheckedIndexedAccess
|
|
115333
|
+
- Prefer type-narrowing and exhaustive logic over assertions; avoid non-null assertions (!) and unsafe casts (as any)
|
|
115334
|
+
- Treat optional values, refs, and array indexing results as possibly undefined and handle them explicitly
|
|
115335
|
+
- Use exhaustive checks for unions (e.g., switch with a never check) and return total values (no implicit undefined)
|
|
115336
|
+
- Do NOT use // @ts-ignore or // @ts-expect-error; fix the types or add guards instead
|
|
115337
|
+
</typescript_quality_guidelines>
|
|
115338
|
+
|
|
115339
|
+
<wix_data_docs>
|
|
115340
|
+
Summary:
|
|
115341
|
+
- Read: items.query('Collection').filter/sort.limit.find() \u2192 { items, totalCount, hasNext }
|
|
115342
|
+
- Write: items.insert | update | remove. Ensure collection permissions allow the action
|
|
115343
|
+
|
|
115344
|
+
Access data using the collection schema:
|
|
115345
|
+
- Always use the exact field keys you defined in the collection schema.
|
|
115346
|
+
- YOU MUST use the collection id exactly as you defined it in the collection schema.
|
|
115347
|
+
|
|
115348
|
+
Example - Insert / Update / Delete (if permissions allow):
|
|
115349
|
+
import { items } from '@wix/data';
|
|
115350
|
+
|
|
115351
|
+
async function addItem(collectionId: string, itemData: WixDataItem) {
|
|
115352
|
+
return items.insert(collectionId, itemData);
|
|
115353
|
+
}
|
|
115354
|
+
|
|
115355
|
+
async function renameItem(collectionId: string, itemData: WixDataItem) {
|
|
115356
|
+
await items.update(collectionId, itemData);
|
|
115357
|
+
}
|
|
115358
|
+
|
|
115359
|
+
async function deleteItem(collectionId: string, itemId: WixDataItem) {
|
|
115360
|
+
await items.remove(collectionId, itemId);
|
|
115361
|
+
}
|
|
115362
|
+
</wix_data_docs>
|
|
115329
115363
|
</WIXCLI_DASHBOARD_PAGE_SYSTEM_PROMPT>
|
|
115330
115364
|
`;
|
|
115331
115365
|
};
|
|
@@ -115352,7 +115386,7 @@ var require_DashboardPageAgent = __commonJS({
|
|
|
115352
115386
|
async buildSystemPrompt() {
|
|
115353
115387
|
return (0, dashboardPagePrompt_1.dashboardPagePrompt)();
|
|
115354
115388
|
}
|
|
115355
|
-
async generate(extension, blueprint, scaffold) {
|
|
115389
|
+
async generate(extension, blueprint, scaffold, createdCollections) {
|
|
115356
115390
|
const examples = (0, load_examples_1.loadExamples)([load_examples_1.types.DashboardPage]);
|
|
115357
115391
|
const systemPrompt = `${await this.buildSystemPrompt()}
|
|
115358
115392
|
${examples}
|
|
@@ -115362,6 +115396,10 @@ ${examples}
|
|
|
115362
115396
|
Extension Name: ${extension.name}
|
|
115363
115397
|
Extension Description: ${extension.description}
|
|
115364
115398
|
App Summary: ${blueprint.summary}
|
|
115399
|
+
|
|
115400
|
+
## CREATED COLLECTIONS
|
|
115401
|
+
${JSON.stringify(createdCollections, null, 2)}
|
|
115402
|
+
|
|
115365
115403
|
## CURRENT SCAFFOLDED FILE
|
|
115366
115404
|
Path: ${scaffold.path}
|
|
115367
115405
|
\`\`\`
|
|
@@ -119791,7 +119829,7 @@ var require_orchestrator = __commonJS({
|
|
|
119791
119829
|
});
|
|
119792
119830
|
const agent = this.agentsFactory.getAgent(extension);
|
|
119793
119831
|
this.emitEvent("agent:start", { extension, name: agent.name });
|
|
119794
|
-
const file = await agent.generate(extension, blueprint, scaffold);
|
|
119832
|
+
const file = await agent.generate(extension, blueprint, scaffold, createdCollections);
|
|
119795
119833
|
const files = [
|
|
119796
119834
|
{ path: scaffold.path, content: file.content }
|
|
119797
119835
|
];
|
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.11",
|
|
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": "62c619e88c2fe6ffd7ba3b0779dbb7d2b1c6e8cefe0bfc412cc743bd"
|
|
28
28
|
}
|