@wix/ditto-codegen-public 1.0.10 → 1.0.12

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.
Files changed (2) hide show
  1. package/dist/out.js +43 -2
  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
  \`\`\`
@@ -119785,13 +119823,16 @@ var require_orchestrator = __commonJS({
119785
119823
  const parallelTasks = extensions.map(async (extension) => {
119786
119824
  this.emitEvent("scaffold:start", { extension });
119787
119825
  const [scaffold] = await (0, ditto_scaffolding_1.copyScaffoldingTemplate)(extension, outputPath);
119826
+ if (!scaffold) {
119827
+ console.warn("Failed to scaffold for extension", extension);
119828
+ }
119788
119829
  this.emitEvent("scaffold:done", {
119789
119830
  extension,
119790
119831
  scaffoldPath: scaffold.path
119791
119832
  });
119792
119833
  const agent = this.agentsFactory.getAgent(extension);
119793
119834
  this.emitEvent("agent:start", { extension, name: agent.name });
119794
- const file = await agent.generate(extension, blueprint, scaffold);
119835
+ const file = await agent.generate(extension, blueprint, scaffold, createdCollections);
119795
119836
  const files = [
119796
119837
  { path: scaffold.path, content: file.content }
119797
119838
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
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": "8f43265a453b39338fbe28d651fd738a805a6494ac3d154604632516"
27
+ "falconPackageHash": "584d5dc8fa842fb1bd1c32c7f9767c26e9463151bd243b06c6348eec"
28
28
  }