@wix/ditto-codegen-public 1.0.245 → 1.0.247
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 +156 -51
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -45320,36 +45320,22 @@ var require_executor = __commonJS({
|
|
|
45320
45320
|
var prompt_builder_1 = require_prompt_builder();
|
|
45321
45321
|
var task_tracker_1 = require_task_tracker();
|
|
45322
45322
|
var process_manager_1 = require_process_manager();
|
|
45323
|
-
var result_builder_1 = require_result_builder();
|
|
45324
45323
|
var process_handlers_1 = require_process_handlers();
|
|
45325
45324
|
var MAX_RETRIES = 5;
|
|
45326
45325
|
async function executeOpenCode(options) {
|
|
45327
45326
|
let lastResult = null;
|
|
45328
45327
|
let accumulatedStdout = "";
|
|
45329
45328
|
let accumulatedUsage = (0, parser_1.createEmptyUsageStats)();
|
|
45329
|
+
let currentPrompt = options.prompt;
|
|
45330
45330
|
for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) {
|
|
45331
45331
|
if (attempt > 1) {
|
|
45332
|
-
console.log(`[OpenCode] Retry attempt ${attempt}/${MAX_RETRIES} -
|
|
45332
|
+
console.log(`[OpenCode] Retry attempt ${attempt}/${MAX_RETRIES} - starting fresh session with recovery context`);
|
|
45333
|
+
const filesChanged = (0, parser_1.parseFilesChanged)(accumulatedStdout);
|
|
45334
|
+
currentPrompt = (0, prompt_builder_1.buildRecoveryPrompt)(options.prompt, filesChanged, lastResult?.error?.message || lastResult?.stderr || "Process timed out");
|
|
45333
45335
|
}
|
|
45334
|
-
const result = await executeOpenCodeOnce(options, attempt);
|
|
45336
|
+
const result = await executeOpenCodeOnce({ ...options, prompt: currentPrompt }, attempt);
|
|
45335
45337
|
accumulatedStdout += result.stdout;
|
|
45336
45338
|
accumulatedUsage = (0, parser_1.mergeUsageStats)(accumulatedUsage, result.usage);
|
|
45337
|
-
if (attempt > 1 && (0, result_builder_1.isCorruptedSessionError)(result)) {
|
|
45338
|
-
console.log(`[OpenCode] Corrupted session detected on --continue attempt ${attempt}. Starting fresh session with recovery context.`);
|
|
45339
|
-
const filesChanged = (0, parser_1.parseFilesChanged)(accumulatedStdout);
|
|
45340
|
-
const recoveryPrompt = (0, prompt_builder_1.buildRecoveryPrompt)(options.prompt, filesChanged, result.error?.message || result.stderr);
|
|
45341
|
-
const recoveryResult = await executeOpenCodeOnce({ ...options, prompt: recoveryPrompt }, 1);
|
|
45342
|
-
accumulatedStdout += recoveryResult.stdout;
|
|
45343
|
-
accumulatedUsage = (0, parser_1.mergeUsageStats)(accumulatedUsage, recoveryResult.usage);
|
|
45344
|
-
const finalResult2 = {
|
|
45345
|
-
...recoveryResult,
|
|
45346
|
-
filesChanged: (0, parser_1.parseFilesChanged)(accumulatedStdout),
|
|
45347
|
-
usage: accumulatedUsage
|
|
45348
|
-
};
|
|
45349
|
-
console.log(`
|
|
45350
|
-
${(0, parser_1.formatUsageStats)(finalResult2.usage)}`);
|
|
45351
|
-
return finalResult2;
|
|
45352
|
-
}
|
|
45353
45339
|
const errorMsg = result.error?.message.toLowerCase() ?? "";
|
|
45354
45340
|
const isRetryableFailure = !result.success && errorMsg.includes("idle timeout");
|
|
45355
45341
|
if (result.success || !isRetryableFailure) {
|
|
@@ -45363,7 +45349,7 @@ ${(0, parser_1.formatUsageStats)(finalResult2.usage)}`);
|
|
|
45363
45349
|
return finalResult2;
|
|
45364
45350
|
}
|
|
45365
45351
|
lastResult = result;
|
|
45366
|
-
console.log(`[OpenCode] Attempt ${attempt}/${MAX_RETRIES} failed due to idle timeout \u2014 will retry with
|
|
45352
|
+
console.log(`[OpenCode] Attempt ${attempt}/${MAX_RETRIES} failed due to idle timeout \u2014 will retry with recovery prompt`);
|
|
45367
45353
|
}
|
|
45368
45354
|
console.log(`[OpenCode] All ${MAX_RETRIES} retry attempts exhausted`);
|
|
45369
45355
|
const finalResult = {
|
|
@@ -45375,16 +45361,7 @@ ${(0, parser_1.formatUsageStats)(finalResult2.usage)}`);
|
|
|
45375
45361
|
${(0, parser_1.formatUsageStats)(finalResult.usage)}`);
|
|
45376
45362
|
return finalResult;
|
|
45377
45363
|
}
|
|
45378
|
-
function buildArgs(
|
|
45379
|
-
if (attempt > 1) {
|
|
45380
|
-
return [
|
|
45381
|
-
"run",
|
|
45382
|
-
"--continue",
|
|
45383
|
-
"--format",
|
|
45384
|
-
"json",
|
|
45385
|
-
"Continue from where you left off. The previous attempt may have been interrupted."
|
|
45386
|
-
];
|
|
45387
|
-
}
|
|
45364
|
+
function buildArgs(prompt) {
|
|
45388
45365
|
return ["run", "--format", "json", prompt];
|
|
45389
45366
|
}
|
|
45390
45367
|
async function executeOpenCodeOnce(options, attempt) {
|
|
@@ -45424,8 +45401,8 @@ ${(0, parser_1.formatUsageStats)(finalResult.usage)}`);
|
|
|
45424
45401
|
finalize: finalize2
|
|
45425
45402
|
};
|
|
45426
45403
|
try {
|
|
45427
|
-
const args = buildArgs(
|
|
45428
|
-
console.log(`[OpenCode] Executing (attempt ${attempt}/${MAX_RETRIES}): opencode run
|
|
45404
|
+
const args = buildArgs(prompt);
|
|
45405
|
+
console.log(`[OpenCode] Executing (attempt ${attempt}/${MAX_RETRIES}): opencode run --format json <prompt>`);
|
|
45429
45406
|
console.log(`[OpenCode] Working directory: ${outputPath}`);
|
|
45430
45407
|
ctx.child = (0, child_process_1.spawn)("opencode", args, {
|
|
45431
45408
|
cwd: outputPath,
|
|
@@ -70098,6 +70075,41 @@ var require_SPIAgent = __commonJS({
|
|
|
70098
70075
|
}
|
|
70099
70076
|
});
|
|
70100
70077
|
|
|
70078
|
+
// ../codegen-common-logic/dist/extensions/DataCollectionAgent.js
|
|
70079
|
+
var require_DataCollectionAgent = __commonJS({
|
|
70080
|
+
"../codegen-common-logic/dist/extensions/DataCollectionAgent.js"(exports2) {
|
|
70081
|
+
"use strict";
|
|
70082
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
70083
|
+
exports2.getDataCollectionDecisionGuide = exports2.getDataCollectionAgentDocumentation = void 0;
|
|
70084
|
+
var getDataCollectionAgentDocumentation = () => {
|
|
70085
|
+
return `<data_collection>
|
|
70086
|
+
#### Data Collections (CMS)
|
|
70087
|
+
|
|
70088
|
+
- **Description**: CMS data collection schemas that define structured data storage for the app. Collections are automatically created when the app is installed on a site. Enables the site's code editor automatically, which is required for Wix Data APIs to work.
|
|
70089
|
+
- **Use Cases**:
|
|
70090
|
+
- Storing business data (products, orders, inventory, fees)
|
|
70091
|
+
- User-generated content (reviews, comments, submissions)
|
|
70092
|
+
- Custom app data that needs to persist across sessions
|
|
70093
|
+
- Relational data with references between collections
|
|
70094
|
+
- Content management for blog posts, articles, or catalog items
|
|
70095
|
+
- **When to Choose**: When the app needs to store and manage structured data that can be accessed from dashboard pages, site pages, backend code, or external applications. Essential when other extensions (Dashboard Pages, Site Widgets) need to read or write persistent data.
|
|
70096
|
+
</data_collection>`;
|
|
70097
|
+
};
|
|
70098
|
+
exports2.getDataCollectionAgentDocumentation = getDataCollectionAgentDocumentation;
|
|
70099
|
+
var getDataCollectionDecisionGuide = () => {
|
|
70100
|
+
return `### Choose Data Collections when:
|
|
70101
|
+
|
|
70102
|
+
- \u2705 The app needs to store and manage structured business data
|
|
70103
|
+
- \u2705 Dashboard Pages need to manage data displayed on the site
|
|
70104
|
+
- \u2705 Site Widgets need to query persistent data
|
|
70105
|
+
- \u2705 You need relational data with references between collections
|
|
70106
|
+
- \u2705 User-generated content needs to be stored (reviews, submissions, comments)
|
|
70107
|
+
- \u2705 Multiple records of the same type need CRUD operations`;
|
|
70108
|
+
};
|
|
70109
|
+
exports2.getDataCollectionDecisionGuide = getDataCollectionDecisionGuide;
|
|
70110
|
+
}
|
|
70111
|
+
});
|
|
70112
|
+
|
|
70101
70113
|
// ../codegen-common-logic/dist/extensions/BackendExtensions.js
|
|
70102
70114
|
var require_BackendExtensions = __commonJS({
|
|
70103
70115
|
"../codegen-common-logic/dist/extensions/BackendExtensions.js"(exports2) {
|
|
@@ -70107,7 +70119,8 @@ var require_BackendExtensions = __commonJS({
|
|
|
70107
70119
|
var BackendApiAgent_1 = require_BackendApiAgent();
|
|
70108
70120
|
var BackendEventAgent_1 = require_BackendEventAgent();
|
|
70109
70121
|
var SPIAgent_1 = require_SPIAgent();
|
|
70110
|
-
var
|
|
70122
|
+
var DataCollectionAgent_1 = require_DataCollectionAgent();
|
|
70123
|
+
var getBackendExtensionsDocumentation = (options) => {
|
|
70111
70124
|
return `### Backend Extensions
|
|
70112
70125
|
|
|
70113
70126
|
Backend extensions provide server-side functionality.
|
|
@@ -70116,7 +70129,9 @@ var require_BackendExtensions = __commonJS({
|
|
|
70116
70129
|
|
|
70117
70130
|
${(0, BackendEventAgent_1.getBackendEventAgentDocumentation)()}
|
|
70118
70131
|
|
|
70119
|
-
${(0, SPIAgent_1.getSPIAgentDocumentation)()}
|
|
70132
|
+
${(0, SPIAgent_1.getSPIAgentDocumentation)()}${options?.enableNewExtensions ? `
|
|
70133
|
+
|
|
70134
|
+
${(0, DataCollectionAgent_1.getDataCollectionAgentDocumentation)()}` : ""}`;
|
|
70120
70135
|
};
|
|
70121
70136
|
exports2.getBackendExtensionsDocumentation = getBackendExtensionsDocumentation;
|
|
70122
70137
|
}
|
|
@@ -70128,7 +70143,8 @@ var require_CustomElementAgent = __commonJS({
|
|
|
70128
70143
|
"use strict";
|
|
70129
70144
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
70130
70145
|
exports2.getSiteWidgetDecisionGuide = exports2.getCustomElementAgentDocumentation = void 0;
|
|
70131
|
-
var getCustomElementAgentDocumentation = () => {
|
|
70146
|
+
var getCustomElementAgentDocumentation = (options) => {
|
|
70147
|
+
const whenToChoose = options?.enableNewExtensions ? `- **When to Choose**: When you need to provide reusable, configurable components for site builders and you need to add functionality to Wix sites for Wix site visitors. This is the DEFAULT choice for site functionality **that is NOT tied to a Wix business solution page**. If the functionality belongs on a product page, booking page, checkout, event page, or blog post \u2192 use Site Plugin instead.` : `- **When to Choose**: When you need to provide reusable, configurable components for site builders and you need to add functionality to Wix sites for Wix site visitors. This is the DEFAULT choice for all site functionality.`;
|
|
70132
70148
|
return `<site_widget>
|
|
70133
70149
|
#### Site Widgets
|
|
70134
70150
|
|
|
@@ -70150,12 +70166,13 @@ var require_CustomElementAgent = __commonJS({
|
|
|
70150
70166
|
- Number inputs
|
|
70151
70167
|
- **When Panel is Sufficient**: For widgets where configuration is per-instance and managed by the site owner in the Editor (e.g., countdown target date, display text, colors, styles). NO Dashboard Page is needed.
|
|
70152
70168
|
- **When Dashboard Page is Needed**: Only when the app requires storing shared configurations in a database, managing multiple configurations across widgets, or providing admin-level analytics/reporting.
|
|
70153
|
-
|
|
70169
|
+
${whenToChoose}
|
|
70154
70170
|
- **IMPORTANT**: Do NOT pair Site Widgets with a Dashboard Page unless the user explicitly requests shared/centralized configuration management. The widget panel handles per-instance configuration.
|
|
70155
70171
|
</site_widget>`;
|
|
70156
70172
|
};
|
|
70157
70173
|
exports2.getCustomElementAgentDocumentation = getCustomElementAgentDocumentation;
|
|
70158
|
-
var getSiteWidgetDecisionGuide = () => {
|
|
70174
|
+
var getSiteWidgetDecisionGuide = (options) => {
|
|
70175
|
+
const defaultChoice = options?.enableNewExtensions ? `- \u2705 **DEFAULT choice for site functionality not tied to a Wix business solution page**` : `- \u2705 **DEFAULT choice for all site functionality**`;
|
|
70159
70176
|
return `### Choose Site Widgets when:
|
|
70160
70177
|
|
|
70161
70178
|
- \u2705 Creating reusable page components
|
|
@@ -70163,7 +70180,7 @@ var require_CustomElementAgent = __commonJS({
|
|
|
70163
70180
|
- \u2705 Need configurable widgets for site builders
|
|
70164
70181
|
- \u2705 Want to provide drag-and-drop functionality
|
|
70165
70182
|
- \u2705 Need to add functionality to Wix sites for site visitors
|
|
70166
|
-
|
|
70183
|
+
${defaultChoice}
|
|
70167
70184
|
|
|
70168
70185
|
### Site Widget Panel vs Dashboard Page:
|
|
70169
70186
|
- \u2705 Use the **built-in widget panel** for per-instance configuration (text, dates, styles, toggles) - NO Dashboard Page needed
|
|
@@ -70320,6 +70337,53 @@ var require_SiteComponentAgent = __commonJS({
|
|
|
70320
70337
|
}
|
|
70321
70338
|
});
|
|
70322
70339
|
|
|
70340
|
+
// ../codegen-common-logic/dist/extensions/SitePluginAgent.js
|
|
70341
|
+
var require_SitePluginAgent = __commonJS({
|
|
70342
|
+
"../codegen-common-logic/dist/extensions/SitePluginAgent.js"(exports2) {
|
|
70343
|
+
"use strict";
|
|
70344
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
70345
|
+
exports2.getSitePluginDecisionGuide = exports2.getSitePluginAgentDocumentation = void 0;
|
|
70346
|
+
var getSitePluginAgentDocumentation = () => {
|
|
70347
|
+
return `<site_plugin>
|
|
70348
|
+
#### Site Plugins
|
|
70349
|
+
|
|
70350
|
+
- **Description**: Custom elements rendered in predefined slots within Wix business solution pages (e.g., Wix Stores product pages, Wix Bookings service pages, Wix eCommerce checkout). Site plugins use native HTMLElement custom elements (not React).
|
|
70351
|
+
- **Use Cases**:
|
|
70352
|
+
- Product page enhancements (e.g., best seller badges, product reviews summary)
|
|
70353
|
+
- Booking page extensions (e.g., custom confirmation messages, appointment insights)
|
|
70354
|
+
- eCommerce slot integrations (e.g., checkout upsells, side cart additions)
|
|
70355
|
+
- Event page custom content
|
|
70356
|
+
- Blog post page enhancements
|
|
70357
|
+
- **Slot System**: Site plugins are placed in predefined slots within existing Wix business solution pages. Each slot is identified by an appDefinitionId, widgetId, and slotId. Site owners can add plugins to slots using the plugin explorer in Wix editors.
|
|
70358
|
+
- **Settings Panel**: Site plugins have a built-in settings panel in the Wix Editor for per-instance configuration using widget.getProp/setProp. Similar to Site Widgets, the panel handles configuration without needing a separate Dashboard Page.
|
|
70359
|
+
- **When to Choose**: When you need to extend existing Wix business solution pages (Stores, Bookings, eCommerce, Events, Blog) with custom UI in predefined slot positions. Unlike Site Widgets (which can be placed anywhere), Site Plugins are designed for specific integration points within Wix business apps.
|
|
70360
|
+
|
|
70361
|
+
**Common Placement Areas:**
|
|
70362
|
+
- Product pages (Wix Stores)
|
|
70363
|
+
- Checkout and side cart (Wix eCommerce)
|
|
70364
|
+
- Booking and service pages (Wix Bookings)
|
|
70365
|
+
- Event pages (Wix Events)
|
|
70366
|
+
- Blog post pages (Wix Blog)
|
|
70367
|
+
|
|
70368
|
+
**Key Differences from Site Widgets:**
|
|
70369
|
+
- Site Plugins go into predefined slots in business solution pages; Site Widgets can be placed anywhere on a site
|
|
70370
|
+
- Site Plugins integrate contextually with existing business app pages; Site Widgets are standalone components
|
|
70371
|
+
</site_plugin>`;
|
|
70372
|
+
};
|
|
70373
|
+
exports2.getSitePluginAgentDocumentation = getSitePluginAgentDocumentation;
|
|
70374
|
+
var getSitePluginDecisionGuide = () => {
|
|
70375
|
+
return `### Choose Site Plugins when:
|
|
70376
|
+
|
|
70377
|
+
- \u2705 Need to extend existing Wix business solution pages (Stores, Bookings, eCommerce, Events, Blog)
|
|
70378
|
+
- \u2705 Want to add contextual UI to predefined slots within business app pages
|
|
70379
|
+
- \u2705 Building product page enhancements, booking page extensions, or checkout integrations
|
|
70380
|
+
- \u2705 Need to integrate with the specific page context (e.g., current product, current booking)
|
|
70381
|
+
- \u2705 Want to leverage the slot-based plugin explorer for site owners`;
|
|
70382
|
+
};
|
|
70383
|
+
exports2.getSitePluginDecisionGuide = getSitePluginDecisionGuide;
|
|
70384
|
+
}
|
|
70385
|
+
});
|
|
70386
|
+
|
|
70323
70387
|
// ../codegen-common-logic/dist/extensions/SiteExtensions.js
|
|
70324
70388
|
var require_SiteExtensions = __commonJS({
|
|
70325
70389
|
"../codegen-common-logic/dist/extensions/SiteExtensions.js"(exports2) {
|
|
@@ -70329,7 +70393,8 @@ var require_SiteExtensions = __commonJS({
|
|
|
70329
70393
|
var EmbeddedScriptAgent_1 = require_EmbeddedScriptAgent();
|
|
70330
70394
|
var SiteComponentAgent_1 = require_SiteComponentAgent();
|
|
70331
70395
|
var CustomElementAgent_1 = require_CustomElementAgent();
|
|
70332
|
-
var
|
|
70396
|
+
var SitePluginAgent_1 = require_SitePluginAgent();
|
|
70397
|
+
var getSiteExtensionsDocumentation = (options) => {
|
|
70333
70398
|
return `### Site Extensions
|
|
70334
70399
|
|
|
70335
70400
|
Site extensions add functionality directly to user websites.
|
|
@@ -70338,7 +70403,9 @@ ${(0, EmbeddedScriptAgent_1.getEmbeddedScriptAgentDocumentation)()}
|
|
|
70338
70403
|
|
|
70339
70404
|
${(0, SiteComponentAgent_1.getSiteComponentAgentDocumentation)()}
|
|
70340
70405
|
|
|
70341
|
-
${(0, CustomElementAgent_1.getCustomElementAgentDocumentation)()}
|
|
70406
|
+
${(0, CustomElementAgent_1.getCustomElementAgentDocumentation)(options)}${options?.enableNewExtensions ? `
|
|
70407
|
+
|
|
70408
|
+
${(0, SitePluginAgent_1.getSitePluginAgentDocumentation)()}` : ""}`;
|
|
70342
70409
|
};
|
|
70343
70410
|
exports2.getSiteExtensionsDocumentation = getSiteExtensionsDocumentation;
|
|
70344
70411
|
}
|
|
@@ -70420,7 +70487,7 @@ var require_DashboardMenuPlugins = __commonJS({
|
|
|
70420
70487
|
"../codegen-common-logic/dist/extensions/DashboardMenuPlugins.js"(exports2) {
|
|
70421
70488
|
"use strict";
|
|
70422
70489
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
70423
|
-
exports2.getDashboardMenuPluginsAgentDocumentation = void 0;
|
|
70490
|
+
exports2.getDashboardMenuPluginsDecisionGuide = exports2.getDashboardMenuPluginsAgentDocumentation = void 0;
|
|
70424
70491
|
var getDashboardMenuPluginsAgentDocumentation = () => {
|
|
70425
70492
|
return `<dashboard_menu_plugins>
|
|
70426
70493
|
#### Dashboard Menu Plugins
|
|
@@ -70434,6 +70501,15 @@ var require_DashboardMenuPlugins = __commonJS({
|
|
|
70434
70501
|
</dashboard_menu_plugins>`;
|
|
70435
70502
|
};
|
|
70436
70503
|
exports2.getDashboardMenuPluginsAgentDocumentation = getDashboardMenuPluginsAgentDocumentation;
|
|
70504
|
+
var getDashboardMenuPluginsDecisionGuide = () => {
|
|
70505
|
+
return `### Choose Dashboard Menu Plugins when:
|
|
70506
|
+
|
|
70507
|
+
- \u2705 Need to add custom navigation items to the dashboard sidebar
|
|
70508
|
+
- \u2705 Want quick-access shortcuts to app features from the dashboard menu
|
|
70509
|
+
- \u2705 Need context-specific actions accessible from dashboard navigation
|
|
70510
|
+
- \u2705 Want to link dashboard menu items to Dashboard Pages`;
|
|
70511
|
+
};
|
|
70512
|
+
exports2.getDashboardMenuPluginsDecisionGuide = getDashboardMenuPluginsDecisionGuide;
|
|
70437
70513
|
}
|
|
70438
70514
|
});
|
|
70439
70515
|
|
|
@@ -70482,21 +70558,27 @@ var require_extensionsDecisionGuide = __commonJS({
|
|
|
70482
70558
|
var BackendApiAgent_1 = require_BackendApiAgent();
|
|
70483
70559
|
var BackendEventAgent_1 = require_BackendEventAgent();
|
|
70484
70560
|
var SPIAgent_1 = require_SPIAgent();
|
|
70485
|
-
var
|
|
70561
|
+
var SitePluginAgent_1 = require_SitePluginAgent();
|
|
70562
|
+
var DataCollectionAgent_1 = require_DataCollectionAgent();
|
|
70563
|
+
var getExtensionDecisionMatrix = (options) => {
|
|
70486
70564
|
return `## Decision Matrix
|
|
70487
70565
|
${(0, DashboardPageAgent_1.getDashboardPageDecisionGuide)()}
|
|
70488
70566
|
|
|
70489
70567
|
${(0, EmbeddedScriptAgent_1.getEmbeddedScriptDecisionGuide)()}
|
|
70490
70568
|
|
|
70491
|
-
${(0, CustomElementAgent_1.getSiteWidgetDecisionGuide)()}
|
|
70569
|
+
${(0, CustomElementAgent_1.getSiteWidgetDecisionGuide)(options)}
|
|
70492
70570
|
|
|
70493
|
-
${(0, SiteComponentAgent_1.getSiteComponentDecisionGuide)()}
|
|
70571
|
+
${(0, SiteComponentAgent_1.getSiteComponentDecisionGuide)()}${options?.enableNewExtensions ? `
|
|
70572
|
+
|
|
70573
|
+
${(0, SitePluginAgent_1.getSitePluginDecisionGuide)()}` : ""}
|
|
70494
70574
|
|
|
70495
70575
|
${(0, BackendApiAgent_1.getBackendApiDecisionGuide)()}
|
|
70496
70576
|
|
|
70497
70577
|
${(0, BackendEventAgent_1.getBackendEventDecisionGuide)()}
|
|
70498
70578
|
|
|
70499
|
-
${(0, SPIAgent_1.getSPIDecisionGuide)()}
|
|
70579
|
+
${(0, SPIAgent_1.getSPIDecisionGuide)()}${options?.enableNewExtensions ? `
|
|
70580
|
+
|
|
70581
|
+
${(0, DataCollectionAgent_1.getDataCollectionDecisionGuide)()}` : ""}`;
|
|
70500
70582
|
};
|
|
70501
70583
|
exports2.getExtensionDecisionMatrix = getExtensionDecisionMatrix;
|
|
70502
70584
|
}
|
|
@@ -70508,12 +70590,8 @@ var require_commonUseCasesGuide = __commonJS({
|
|
|
70508
70590
|
"use strict";
|
|
70509
70591
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
70510
70592
|
exports2.getCommonUseCasesGuide = void 0;
|
|
70511
|
-
var getCommonUseCasesGuide = () => {
|
|
70512
|
-
|
|
70513
|
-
|
|
70514
|
-
| **Need** | **Recommended Extension** | **Specific Slot/Location** | **Reason** |
|
|
70515
|
-
| ----------------------------- | ---------------------------- | -------------------------------------- | -------------------------------------- |
|
|
70516
|
-
| Analytics tracking | Embedded Scripts | Site-wide injection | Perfect for third-party code injection |
|
|
70593
|
+
var getCommonUseCasesGuide = (options) => {
|
|
70594
|
+
const baseRows = `| Analytics tracking | Embedded Scripts | Site-wide injection | Perfect for third-party code injection |
|
|
70517
70595
|
| Site-wide popups | Embedded Scripts | Site-wide injection | Configurable overlays with dashboard control |
|
|
70518
70596
|
| Countdown timers | Embedded Scripts | Site-wide injection | Event countdowns with dashboard management |
|
|
70519
70597
|
| Cookie consent banners | Embedded Scripts | Site-wide injection | GDPR compliance with customization |
|
|
@@ -70529,6 +70607,31 @@ var require_commonUseCasesGuide = __commonJS({
|
|
|
70529
70607
|
| Custom shipping rates | Service Plugins (SPIs) | Checkout flow integration | Modify existing business flows |
|
|
70530
70608
|
| Tax calculations | Service Plugins (SPIs) | Checkout flow integration | Custom tax logic integration |
|
|
70531
70609
|
| Custom pricing logic | Service Plugins (SPIs) | Platform-level integration | Platform-level business customization |`;
|
|
70610
|
+
const newExtensionRows = `| Product reviews on product page | Site Plugins | Predefined slots in product pages | Reviews are contextually tied to each product \u2192 Site Plugin, not Site Widget |
|
|
70611
|
+
| Product page enhancements | Site Plugins | Predefined slots in business pages | Contextual integration with Stores, Bookings, etc. |
|
|
70612
|
+
| Booking page extensions | Site Plugins | Predefined slots in business pages | Extend existing Wix business solution pages |
|
|
70613
|
+
| Checkout upsells | Site Plugins | Predefined slots in eCommerce pages | Fixed slot integration in checkout flow |
|
|
70614
|
+
| App-specific data storage | Data Collections | CMS data layer | Structured data for app extensions to read/write |
|
|
70615
|
+
| Per-product fees/rules | Dashboard Page + Service Plugin + Data Collection | Admin + checkout + data | Dashboard manages rules, Data Collection stores them, Service Plugin reads at checkout |`;
|
|
70616
|
+
const comparisonGuide = `
|
|
70617
|
+
## Extension Comparison Guide
|
|
70618
|
+
|
|
70619
|
+
| **Site Widget vs Site Plugin** | **Service Plugin vs Backend Event** |
|
|
70620
|
+
| ------------------------------ | ----------------------------------- |
|
|
70621
|
+
| Widget: user places anywhere on site | Service Plugin: runs DURING a business flow (checkout, shipping, tax) |
|
|
70622
|
+
| Plugin: fixed slot in a Wix business solution page (Stores, Bookings, etc.) | Backend Event: runs AFTER a platform event occurs (order created, contact added) |
|
|
70623
|
+
|
|
70624
|
+
| **Dashboard Page vs Embedded Script** | **Site Widget vs Embedded Script** |
|
|
70625
|
+
| ------------------------------------- | ---------------------------------- |
|
|
70626
|
+
| Dashboard Page: admin-only interface for managing settings/data | Site Widget: standalone component placed on page by site owner |
|
|
70627
|
+
| Embedded Script: code injected into every site page for visitors | Embedded Script: code injected site-wide (analytics, popups, effects) |`;
|
|
70628
|
+
return `## Quick Reference for Common Use Cases
|
|
70629
|
+
|
|
70630
|
+
| **Need** | **Recommended Extension** | **Specific Slot/Location** | **Reason** |
|
|
70631
|
+
| ----------------------------- | ---------------------------- | -------------------------------------- | -------------------------------------- |
|
|
70632
|
+
${baseRows}${options?.enableNewExtensions ? `
|
|
70633
|
+
${newExtensionRows}
|
|
70634
|
+
${comparisonGuide}` : ""}`;
|
|
70532
70635
|
};
|
|
70533
70636
|
exports2.getCommonUseCasesGuide = getCommonUseCasesGuide;
|
|
70534
70637
|
}
|
|
@@ -71371,6 +71474,8 @@ var require_dist12 = __commonJS({
|
|
|
71371
71474
|
__exportStar2(require_DashboardPlugins(), exports2);
|
|
71372
71475
|
__exportStar2(require_DashboardMenuPlugins(), exports2);
|
|
71373
71476
|
__exportStar2(require_DashboardModals(), exports2);
|
|
71477
|
+
__exportStar2(require_SitePluginAgent(), exports2);
|
|
71478
|
+
__exportStar2(require_DataCollectionAgent(), exports2);
|
|
71374
71479
|
__exportStar2(require_extensionsDecisionGuide(), exports2);
|
|
71375
71480
|
__exportStar2(require_commonUseCasesGuide(), exports2);
|
|
71376
71481
|
__exportStar2(require_system_prompts(), exports2);
|
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.247",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"@wix/ditto-codegen": "1.0.0",
|
|
29
29
|
"esbuild": "^0.27.2"
|
|
30
30
|
},
|
|
31
|
-
"falconPackageHash": "
|
|
31
|
+
"falconPackageHash": "b0bc16c0911edf87e5e0585d73f3277742d1fb1061aa28a99b642eca"
|
|
32
32
|
}
|