@wix/ditto-codegen-public 1.0.253 → 1.0.255
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 +32 -7
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -48071,6 +48071,7 @@ var require_config = __commonJS({
|
|
|
48071
48071
|
exports2.DEFAULT_MODEL = exports2.DEFAULT_TIMEOUT_MS = void 0;
|
|
48072
48072
|
exports2.getAnthropicBaseUrl = getAnthropicBaseUrl;
|
|
48073
48073
|
exports2.getOpenCodeEnv = getOpenCodeEnv;
|
|
48074
|
+
var os_1 = require("os");
|
|
48074
48075
|
var codeGenerationService_12 = require_codeGenerationService();
|
|
48075
48076
|
exports2.DEFAULT_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
48076
48077
|
exports2.DEFAULT_MODEL = "anthropic/claude-sonnet-4-6";
|
|
@@ -48117,12 +48118,21 @@ var require_config = __commonJS({
|
|
|
48117
48118
|
}
|
|
48118
48119
|
};
|
|
48119
48120
|
}
|
|
48121
|
+
function ensureOpenCodeInPath() {
|
|
48122
|
+
const currentPath = process.env.PATH || "";
|
|
48123
|
+
const opencodeBin = `${(0, os_1.homedir)()}/.opencode/bin`;
|
|
48124
|
+
if (currentPath.includes(opencodeBin)) {
|
|
48125
|
+
return currentPath;
|
|
48126
|
+
}
|
|
48127
|
+
return `${opencodeBin}:${currentPath}`;
|
|
48128
|
+
}
|
|
48120
48129
|
function getOpenCodeEnv(projectId) {
|
|
48121
48130
|
const anthropicBaseUrl = getAnthropicBaseUrl(projectId);
|
|
48122
48131
|
const accessToken = process.env.WIX_ACCESS_TOKEN;
|
|
48123
48132
|
const config2 = getOpenCodeConfig(accessToken);
|
|
48124
48133
|
return {
|
|
48125
48134
|
...process.env,
|
|
48135
|
+
PATH: ensureOpenCodeInPath(),
|
|
48126
48136
|
ANTHROPIC_BASE_URL: anthropicBaseUrl,
|
|
48127
48137
|
OPENCODE_CONFIG_CONTENT: JSON.stringify(config2),
|
|
48128
48138
|
OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS: exports2.DEFAULT_TIMEOUT_MS.toString(),
|
|
@@ -91451,9 +91461,21 @@ var require_sdk_picker_agent_instructions = __commonJS({
|
|
|
91451
91461
|
id: "current-0",
|
|
91452
91462
|
relatedApis: [
|
|
91453
91463
|
{
|
|
91454
|
-
api: "stores.
|
|
91455
|
-
reason: "
|
|
91464
|
+
api: "stores.catalogVersioning.getCatalogVersion",
|
|
91465
|
+
reason: "Detect catalog version (V1 or V3) to use correct API",
|
|
91456
91466
|
score: 95,
|
|
91467
|
+
docsUrl: "https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-versioning/get-catalog-version"
|
|
91468
|
+
},
|
|
91469
|
+
{
|
|
91470
|
+
api: "stores.products.queryProducts",
|
|
91471
|
+
reason: "Query products for V1 catalog sites",
|
|
91472
|
+
score: 90,
|
|
91473
|
+
docsUrl: "https://dev.wix.com/docs/sdk/backend-modules/stores/products/query-products"
|
|
91474
|
+
},
|
|
91475
|
+
{
|
|
91476
|
+
api: "stores.productsV3.queryProducts",
|
|
91477
|
+
reason: "Query products for V3 catalog sites",
|
|
91478
|
+
score: 90,
|
|
91457
91479
|
docsUrl: "https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/products-v3/query-products"
|
|
91458
91480
|
}
|
|
91459
91481
|
]
|
|
@@ -91566,11 +91588,14 @@ Given an array of extensions (each with a unique ID):
|
|
|
91566
91588
|
- **DO NOT suggest unrelated SPIs**
|
|
91567
91589
|
- **One SPI per service plugin is usually enough** - the SPI handler is the core functionality
|
|
91568
91590
|
|
|
91569
|
-
**
|
|
91570
|
-
- **
|
|
91571
|
-
- **
|
|
91572
|
-
- **
|
|
91573
|
-
- **
|
|
91591
|
+
**Wix Stores Catalog Versioning (CRITICAL):**
|
|
91592
|
+
- **Wix Stores has TWO incompatible catalog versions** - sites may use V1 or V3
|
|
91593
|
+
- **ALWAYS include BOTH V1 and V3 APIs** when working with Stores products/inventory
|
|
91594
|
+
- **ALWAYS include \`stores.catalogVersioning.getCatalogVersion\`** for version detection
|
|
91595
|
+
- **V1 APIs:** \`stores.products\`, \`stores.inventory\` (legacy sites)
|
|
91596
|
+
- **V3 APIs:** \`stores.productsV3\`, \`stores.inventoryItemsV3\` (current sites)
|
|
91597
|
+
- **Search for both versions:** "products queryProducts" AND "productsV3 queryProducts"
|
|
91598
|
+
- **The generated code must check catalog version at runtime and use the appropriate API**`;
|
|
91574
91599
|
exports2.sdkPickerAgentConstraints = `- **BE SPECIFIC**: Use exact API method names (e.g., 'ecom.orders.getOrder', not just 'orders')
|
|
91575
91600
|
- **SCORE ACCURATELY**: Give honest scores - don't inflate, be realistic about importance
|
|
91576
91601
|
- **EXPLAIN CLEARLY**: Each API must have a clear reason explaining its specific purpose
|
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.255",
|
|
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": "952e95a7453a367ddd1dbfb4b3c736b30399068d31e47b63d846cb74"
|
|
32
32
|
}
|