@wix/ditto-codegen-public 1.0.87 → 1.0.88
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 +45 -14
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -118286,6 +118286,26 @@ ${apiDocs}
|
|
|
118286
118286
|
}
|
|
118287
118287
|
});
|
|
118288
118288
|
|
|
118289
|
+
// dist/system-prompts/corePrinciples.js
|
|
118290
|
+
var require_corePrinciples = __commonJS({
|
|
118291
|
+
"dist/system-prompts/corePrinciples.js"(exports2) {
|
|
118292
|
+
"use strict";
|
|
118293
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
118294
|
+
exports2.getCorePrinciples = getCorePrinciples;
|
|
118295
|
+
function getCorePrinciples() {
|
|
118296
|
+
return `
|
|
118297
|
+
<core_principles>
|
|
118298
|
+
- Do NOT invent or assume new types, modules, functions, props, events, or imports
|
|
118299
|
+
- NEVER use mocks, placeholders, or TODOs in any code
|
|
118300
|
+
- ALWAYS implement complete, production-ready functionality
|
|
118301
|
+
- Follow Wix service plugin patterns and best practices precisely
|
|
118302
|
+
- Handle all edge cases and error scenarios appropriately
|
|
118303
|
+
</core_principles>
|
|
118304
|
+
`;
|
|
118305
|
+
}
|
|
118306
|
+
}
|
|
118307
|
+
});
|
|
118308
|
+
|
|
118289
118309
|
// dist/system-prompts/dashboardPage/dashboardPagePrompt.js
|
|
118290
118310
|
var require_dashboardPagePrompt = __commonJS({
|
|
118291
118311
|
"dist/system-prompts/dashboardPage/dashboardPagePrompt.js"(exports2) {
|
|
@@ -118299,6 +118319,7 @@ var require_dashboardPagePrompt = __commonJS({
|
|
|
118299
118319
|
var apiSpecPrompt_1 = require_apiSpecPrompt();
|
|
118300
118320
|
var dynamicParameters_1 = require_dynamicParameters();
|
|
118301
118321
|
var apiDocLoader_1 = require_apiDocLoader();
|
|
118322
|
+
var corePrinciples_1 = require_corePrinciples();
|
|
118302
118323
|
var listOfWdsComponents = [
|
|
118303
118324
|
"AutoComplete",
|
|
118304
118325
|
"Card",
|
|
@@ -118396,6 +118417,8 @@ ${apiDocs}
|
|
|
118396
118417
|
${wdsPrompt}
|
|
118397
118418
|
</wds_reference>
|
|
118398
118419
|
|
|
118420
|
+
${(0, corePrinciples_1.getCorePrinciples)()}
|
|
118421
|
+
|
|
118399
118422
|
<typescript_quality_guidelines>
|
|
118400
118423
|
- Generated code MUST compile with zero TypeScript errors under strict settings:
|
|
118401
118424
|
strict, noImplicitAny, strictNullChecks, exactOptionalPropertyTypes, noUncheckedIndexedAccess
|
|
@@ -119170,12 +119193,15 @@ var require_siteComponentPrompt = __commonJS({
|
|
|
119170
119193
|
"use strict";
|
|
119171
119194
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
119172
119195
|
exports2.siteComponentPrompt = void 0;
|
|
119196
|
+
var corePrinciples_1 = require_corePrinciples();
|
|
119173
119197
|
var siteComponentPrompt = async () => {
|
|
119174
119198
|
return `
|
|
119175
119199
|
<WIXCLI_SITE_COMPONENT_SYSTEM_PROMPT>
|
|
119176
119200
|
<role>
|
|
119177
119201
|
You are a senior Wix CLI App Developer and React expert. Your job is to produce a beautiful, production\u2011quality site component quickly and correctly.
|
|
119178
119202
|
</role>
|
|
119203
|
+
|
|
119204
|
+
${(0, corePrinciples_1.getCorePrinciples)()}
|
|
119179
119205
|
|
|
119180
119206
|
<rules>
|
|
119181
119207
|
- Return ONLY a JSON object matching the schema { path, content, type } (no prose, no markdown)
|
|
@@ -119279,12 +119305,15 @@ var require_customElementPrompt = __commonJS({
|
|
|
119279
119305
|
"use strict";
|
|
119280
119306
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
119281
119307
|
exports2.customElementPrompt = void 0;
|
|
119308
|
+
var corePrinciples_1 = require_corePrinciples();
|
|
119282
119309
|
var customElementPrompt = async () => {
|
|
119283
119310
|
return `
|
|
119284
119311
|
<WIXCLI_CUSTOM_ELEMENT_SYSTEM_PROMPT>
|
|
119285
119312
|
<role>
|
|
119286
119313
|
You are a senior Wix CLI App Developer and React expert. Your job is to produce a beautiful, production\u2011quality site component quickly and correctly.
|
|
119287
119314
|
</role>
|
|
119315
|
+
|
|
119316
|
+
${(0, corePrinciples_1.getCorePrinciples)()}
|
|
119288
119317
|
|
|
119289
119318
|
<rules>
|
|
119290
119319
|
- Return ONLY a JSON object matching the schema { path, content, type } (no prose, no markdown)
|
|
@@ -119511,6 +119540,7 @@ var require_servicePluginPrompt = __commonJS({
|
|
|
119511
119540
|
var servicePluginDocLoader_1 = require_servicePluginDocLoader();
|
|
119512
119541
|
var apiDocLoader_1 = require_apiDocLoader();
|
|
119513
119542
|
var useElevate_1 = require_useElevate();
|
|
119543
|
+
var corePrinciples_1 = require_corePrinciples();
|
|
119514
119544
|
function getServicePluginPrompt(spiNames = [], apiNames = [], useData = false, useIteration) {
|
|
119515
119545
|
const servicePluginDocs = (0, servicePluginDocLoader_1.loadServicePluginDocumentation)(spiNames);
|
|
119516
119546
|
const apiDocs = (0, apiDocLoader_1.loadApiDocumentation)(apiNames, useData, useIteration);
|
|
@@ -119540,15 +119570,7 @@ src/
|
|
|
119540
119570
|
|
|
119541
119571
|
</service_plugin_extension_files_and_code>
|
|
119542
119572
|
|
|
119543
|
-
|
|
119544
|
-
- Do NOT invent or assume new types, modules, functions, props, events, or imports
|
|
119545
|
-
- If capabilities are undocumented/unavailable, explicitly state the gap and proceed only with documented minimal logic
|
|
119546
|
-
- NEVER use mocks, placeholders, or TODOs in any code
|
|
119547
|
-
- ALWAYS implement complete, production-ready functionality
|
|
119548
|
-
- Follow Wix service plugin patterns and best practices precisely
|
|
119549
|
-
- Implement all required handler functions according to Wix specifications
|
|
119550
|
-
- Handle all edge cases and error scenarios appropriately
|
|
119551
|
-
</core_principles>
|
|
119573
|
+
${(0, corePrinciples_1.getCorePrinciples)()}
|
|
119552
119574
|
|
|
119553
119575
|
<generation_requirements>
|
|
119554
119576
|
1. Implement ALL required handler functions with complete business logic
|
|
@@ -119562,6 +119584,9 @@ Focus on implementing the EXACT business logic described in the user prompt.
|
|
|
119562
119584
|
|
|
119563
119585
|
<plugin_implementation_patterns>
|
|
119564
119586
|
|
|
119587
|
+
- If capabilities are undocumented/unavailable, explicitly state the gap and proceed only with documented minimal logic
|
|
119588
|
+
- Implement all required handler functions according to Wix specifications
|
|
119589
|
+
|
|
119565
119590
|
<error_handling>
|
|
119566
119591
|
- Always implement proper error handling in service plugins
|
|
119567
119592
|
- Return appropriate error responses when data is invalid
|
|
@@ -119710,6 +119735,7 @@ var require_backendEventPrompt = __commonJS({
|
|
|
119710
119735
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
119711
119736
|
exports2.backendEventPrompt = void 0;
|
|
119712
119737
|
var apiDocLoader_1 = require_apiDocLoader();
|
|
119738
|
+
var corePrinciples_1 = require_corePrinciples();
|
|
119713
119739
|
var useElevate_1 = require_useElevate();
|
|
119714
119740
|
var backendEventPrompt = (apiNames, useData, useIteration) => {
|
|
119715
119741
|
const apiDocs = (0, apiDocLoader_1.loadApiDocumentation)(apiNames, useData, useIteration);
|
|
@@ -119719,6 +119745,8 @@ var require_backendEventPrompt = __commonJS({
|
|
|
119719
119745
|
You are a Wix backend event handler generator. Create event extensions for Wix CLI apps using the JavaScript SDK. Events are triggered when specific conditions on the app or user's site are met.
|
|
119720
119746
|
</role>
|
|
119721
119747
|
|
|
119748
|
+
${(0, corePrinciples_1.getCorePrinciples)()}
|
|
119749
|
+
|
|
119722
119750
|
<event_handler_patterns>
|
|
119723
119751
|
- Use the correct SDK import for the service (e.g., import { products } from '@wix/stores')
|
|
119724
119752
|
- Implement event listeners using the .on[EventName]() pattern
|
|
@@ -119864,6 +119892,7 @@ var require_backendApi = __commonJS({
|
|
|
119864
119892
|
"use strict";
|
|
119865
119893
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
119866
119894
|
exports2.backendApiPrompt = void 0;
|
|
119895
|
+
var corePrinciples_1 = require_corePrinciples();
|
|
119867
119896
|
var backendApiPrompt = () => {
|
|
119868
119897
|
return `
|
|
119869
119898
|
You are a specialized code-generation agent for creating Astro Server Endpoints (API Routes) for fullstack applications.
|
|
@@ -119942,6 +119971,8 @@ export async function GET({ params }) {
|
|
|
119942
119971
|
## Your Task
|
|
119943
119972
|
Generate clean, well-structured Astro Server Endpoints based on the API Spec that follow these patterns and best practices.
|
|
119944
119973
|
Focus on creating maintainable, secure, and efficient API routes that integrate well with frontend applications.
|
|
119974
|
+
|
|
119975
|
+
${(0, corePrinciples_1.getCorePrinciples)()}
|
|
119945
119976
|
`;
|
|
119946
119977
|
};
|
|
119947
119978
|
exports2.backendApiPrompt = backendApiPrompt;
|
|
@@ -120143,6 +120174,7 @@ var require_embededScript = __commonJS({
|
|
|
120143
120174
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
120144
120175
|
exports2.embeddedScriptPrompt = void 0;
|
|
120145
120176
|
var apiDocLoader_1 = require_apiDocLoader();
|
|
120177
|
+
var corePrinciples_1 = require_corePrinciples();
|
|
120146
120178
|
var dynamicParameters_1 = require_dynamicParameters2();
|
|
120147
120179
|
var embeddedScriptPrompt = (hasDynamicParameters, apiNames, useData, useIteration) => {
|
|
120148
120180
|
const apiDocs = (0, apiDocLoader_1.loadApiDocumentation)(apiNames, useData, useIteration);
|
|
@@ -120194,16 +120226,15 @@ Embedded scripts support parameterization using template variable syntax {{varia
|
|
|
120194
120226
|
|
|
120195
120227
|
</embedded_script_extension_files_and_code>
|
|
120196
120228
|
|
|
120197
|
-
|
|
120198
|
-
|
|
120199
|
-
|
|
120200
|
-
- ALWAYS implement complete, production-ready functionality
|
|
120229
|
+
${(0, corePrinciples_1.getCorePrinciples)()}
|
|
120230
|
+
|
|
120231
|
+
<embedded_script_principles>
|
|
120201
120232
|
- Handle errors gracefully and fail silently when appropriate for embedded scripts
|
|
120202
120233
|
- Minimize performance impact - embedded scripts should be lightweight and non-blocking
|
|
120203
120234
|
- Follow web security best practices (avoid inline event handlers, validate data, escape user input)
|
|
120204
120235
|
- ONLY create fetch() calls to /api/* endpoints that are explicitly defined in the provided API spec - verify each endpoint exists before using it
|
|
120205
120236
|
- If no API spec is provided, do NOT create ANY /api/* fetch calls
|
|
120206
|
-
</
|
|
120237
|
+
</embedded_script_principles>
|
|
120207
120238
|
|
|
120208
120239
|
<generation_requirements>
|
|
120209
120240
|
1. Generate the embedded.html file with complete HTML/JavaScript implementation
|
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.88",
|
|
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": "564c8f96bead5bb075274506d3679a9b6f991496e9083bf85f594a3b"
|
|
28
28
|
}
|