@wix/ditto-codegen-public 1.0.50 → 1.0.52
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/docs-output/api-docs/crm-contacts-onContactCreated-doc.txt +183 -0
- package/dist/docs-output/api-docs/data-items-onDataItemCreated.txt +103 -0
- package/dist/docs-output/api-docs/stores-product-onProductCreated-doc.txt +118 -0
- package/dist/docs-output/api-docs/stores-productV3-onProductCreated-doc.txt +184 -0
- package/dist/docs-output/api-docs/stores-productsV3-updateProduct-doc.txt +130 -0
- package/dist/examples-apps/contact-created-logger/package-lock.json +15102 -0
- package/dist/examples-apps/contact-created-logger/package.json +37 -0
- package/dist/examples-apps/contact-created-logger/src/backend/events/contact-created-logger/event.ts +51 -0
- package/dist/examples-apps/contact-created-logger/tsconfig.json +5 -0
- package/dist/examples-apps/contact-created-logger/wix.config.json +4 -0
- package/dist/examples-apps/product-created-logger/package-lock.json +15102 -0
- package/dist/examples-apps/product-created-logger/package.json +37 -0
- package/dist/examples-apps/product-created-logger/src/backend/events/product-created-logger/event.ts +67 -0
- package/dist/examples-apps/product-created-logger/tsconfig.json +5 -0
- package/dist/examples-apps/product-created-logger/wix.config.json +4 -0
- package/dist/out.js +431 -92
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -77576,9 +77576,9 @@ var require_types_impl = __commonJS({
|
|
|
77576
77576
|
}
|
|
77577
77577
|
});
|
|
77578
77578
|
|
|
77579
|
-
// dist/system-prompts/
|
|
77580
|
-
var
|
|
77581
|
-
"dist/system-prompts/
|
|
77579
|
+
// dist/system-prompts/docLoader.js
|
|
77580
|
+
var require_docLoader = __commonJS({
|
|
77581
|
+
"dist/system-prompts/docLoader.js"(exports2) {
|
|
77582
77582
|
"use strict";
|
|
77583
77583
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
77584
77584
|
if (k2 === void 0) k2 = k;
|
|
@@ -77617,11 +77617,57 @@ var require_servicePluginDocLoader = __commonJS({
|
|
|
77617
77617
|
return result;
|
|
77618
77618
|
};
|
|
77619
77619
|
})();
|
|
77620
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod2) {
|
|
77621
|
+
return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
|
|
77622
|
+
};
|
|
77623
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
77624
|
+
exports2.DocType = void 0;
|
|
77625
|
+
exports2.loadDocumentation = loadDocumentation;
|
|
77626
|
+
var path_1 = __importDefault2(require("path"));
|
|
77627
|
+
var fs4 = __importStar2(require("fs"));
|
|
77628
|
+
var DocType;
|
|
77629
|
+
(function(DocType2) {
|
|
77630
|
+
DocType2["API"] = "api";
|
|
77631
|
+
DocType2["SERVICE_PLUGIN"] = "service-plugin";
|
|
77632
|
+
})(DocType || (exports2.DocType = DocType = {}));
|
|
77633
|
+
function loadDocumentation(items, mapping, docType) {
|
|
77634
|
+
if (!items || items.length === 0) {
|
|
77635
|
+
return "";
|
|
77636
|
+
}
|
|
77637
|
+
const loadedDocs = /* @__PURE__ */ new Set();
|
|
77638
|
+
let combinedContent = "";
|
|
77639
|
+
for (const item of items) {
|
|
77640
|
+
const docFileName = mapping[item];
|
|
77641
|
+
if (docFileName && !loadedDocs.has(docFileName)) {
|
|
77642
|
+
try {
|
|
77643
|
+
const docsSubDir = docType === DocType.API ? "api-docs" : "service-plugins";
|
|
77644
|
+
const docPath = path_1.default.join(__dirname, "docs-output", docsSubDir, docFileName);
|
|
77645
|
+
if (fs4.existsSync(docPath)) {
|
|
77646
|
+
const docContent = fs4.readFileSync(docPath, "utf8");
|
|
77647
|
+
combinedContent += docContent + "\n";
|
|
77648
|
+
loadedDocs.add(docFileName);
|
|
77649
|
+
console.log(`\u2713 Loaded ${docType} documentation: ${docFileName}`);
|
|
77650
|
+
} else {
|
|
77651
|
+
console.warn(`\u26A0 ${docType} documentation not found: ${docPath}`);
|
|
77652
|
+
}
|
|
77653
|
+
} catch (error) {
|
|
77654
|
+
console.error(`\u2717 Failed to load ${docType} documentation for ${item}:`, error);
|
|
77655
|
+
}
|
|
77656
|
+
}
|
|
77657
|
+
}
|
|
77658
|
+
return combinedContent.trim();
|
|
77659
|
+
}
|
|
77660
|
+
}
|
|
77661
|
+
});
|
|
77662
|
+
|
|
77663
|
+
// dist/system-prompts/servicePlugin/servicePluginDocLoader.js
|
|
77664
|
+
var require_servicePluginDocLoader = __commonJS({
|
|
77665
|
+
"dist/system-prompts/servicePlugin/servicePluginDocLoader.js"(exports2) {
|
|
77666
|
+
"use strict";
|
|
77620
77667
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
77621
77668
|
exports2.isSPIName = isSPIName;
|
|
77622
77669
|
exports2.loadServicePluginDocumentation = loadServicePluginDocumentation;
|
|
77623
|
-
var
|
|
77624
|
-
var path2 = __importStar2(require("path"));
|
|
77670
|
+
var docLoader_1 = require_docLoader();
|
|
77625
77671
|
function isSPIName(value) {
|
|
77626
77672
|
const validSPINames = [
|
|
77627
77673
|
"ecom.shippingRates.getShippingRates",
|
|
@@ -77654,31 +77700,7 @@ var require_servicePluginDocLoader = __commonJS({
|
|
|
77654
77700
|
"ecom.catalog.getCatalogItems": "ecom-catalog-doc.txt"
|
|
77655
77701
|
};
|
|
77656
77702
|
function loadServicePluginDocumentation(spiNames) {
|
|
77657
|
-
|
|
77658
|
-
return "";
|
|
77659
|
-
}
|
|
77660
|
-
const docsDir = path2.join(__dirname, "docs-output", "service-plugins");
|
|
77661
|
-
const loadedDocs = /* @__PURE__ */ new Set();
|
|
77662
|
-
let combinedContent = "";
|
|
77663
|
-
for (const spiName of spiNames) {
|
|
77664
|
-
const docFileName = SPI_TO_DOC_MAPPING[spiName];
|
|
77665
|
-
if (docFileName && !loadedDocs.has(docFileName)) {
|
|
77666
|
-
try {
|
|
77667
|
-
const docPath = path2.join(docsDir, docFileName);
|
|
77668
|
-
if (fs4.existsSync(docPath)) {
|
|
77669
|
-
const docContent = fs4.readFileSync(docPath, "utf8");
|
|
77670
|
-
combinedContent += docContent + "\n";
|
|
77671
|
-
loadedDocs.add(docFileName);
|
|
77672
|
-
console.log(`\u2713 Loaded service plugin documentation: ${docFileName}`);
|
|
77673
|
-
} else {
|
|
77674
|
-
console.warn(`\u26A0 Service plugin documentation not found: ${docPath}`);
|
|
77675
|
-
}
|
|
77676
|
-
} catch (error) {
|
|
77677
|
-
console.error(`\u2717 Failed to load service plugin documentation for ${spiName}:`, error);
|
|
77678
|
-
}
|
|
77679
|
-
}
|
|
77680
|
-
}
|
|
77681
|
-
return combinedContent.trim();
|
|
77703
|
+
return (0, docLoader_1.loadDocumentation)(spiNames, SPI_TO_DOC_MAPPING, docLoader_1.DocType.SERVICE_PLUGIN);
|
|
77682
77704
|
}
|
|
77683
77705
|
}
|
|
77684
77706
|
});
|
|
@@ -120427,6 +120449,7 @@ var require_load_examples = __commonJS({
|
|
|
120427
120449
|
types2[types2["ServicePluginExtension"] = 3] = "ServicePluginExtension";
|
|
120428
120450
|
types2[types2["CustomElementPlugin"] = 4] = "CustomElementPlugin";
|
|
120429
120451
|
types2[types2["CustomElementWidget"] = 5] = "CustomElementWidget";
|
|
120452
|
+
types2[types2["BackendEvent"] = 6] = "BackendEvent";
|
|
120430
120453
|
})(types || (exports2.types = types = {}));
|
|
120431
120454
|
var appsExamples = {
|
|
120432
120455
|
AIChatbot: {
|
|
@@ -120581,6 +120604,24 @@ var require_load_examples = __commonJS({
|
|
|
120581
120604
|
"event-countdown/src/site/embedded-scripts/countdown-timer/embedded.html"
|
|
120582
120605
|
]
|
|
120583
120606
|
}
|
|
120607
|
+
},
|
|
120608
|
+
ProductCreatedLogger: {
|
|
120609
|
+
path: "product-created-logger",
|
|
120610
|
+
description: "A webhook that logs product changes",
|
|
120611
|
+
files: {
|
|
120612
|
+
[types.BackendEvent]: [
|
|
120613
|
+
"product-created-logger/src/backend/events/product-created-logger/event.ts"
|
|
120614
|
+
]
|
|
120615
|
+
}
|
|
120616
|
+
},
|
|
120617
|
+
ContactCreatedLogger: {
|
|
120618
|
+
path: "contact-created-logger",
|
|
120619
|
+
description: "A webhook that logs contact created",
|
|
120620
|
+
files: {
|
|
120621
|
+
[types.BackendEvent]: [
|
|
120622
|
+
"contact-created-logger/src/backend/events/contact-created-logger/event.ts"
|
|
120623
|
+
]
|
|
120624
|
+
}
|
|
120584
120625
|
}
|
|
120585
120626
|
};
|
|
120586
120627
|
exports2.examples = {
|
|
@@ -120604,7 +120645,11 @@ var require_load_examples = __commonJS({
|
|
|
120604
120645
|
],
|
|
120605
120646
|
[types.ServicePluginExtension]: [appsExamples.SPISExample],
|
|
120606
120647
|
[types.CustomElementPlugin]: [appsExamples.InventoryCountdown],
|
|
120607
|
-
[types.CustomElementWidget]: [appsExamples.CustomElementWidget]
|
|
120648
|
+
[types.CustomElementWidget]: [appsExamples.CustomElementWidget],
|
|
120649
|
+
[types.BackendEvent]: [
|
|
120650
|
+
appsExamples.ProductCreatedLogger,
|
|
120651
|
+
appsExamples.ContactCreatedLogger
|
|
120652
|
+
]
|
|
120608
120653
|
};
|
|
120609
120654
|
var loadExamples = (pluginTypes) => {
|
|
120610
120655
|
const examplesAppsBasePath = path_1.default.join(__dirname, "examples-apps");
|
|
@@ -124916,6 +124961,174 @@ var require_SiteComponentAgent = __commonJS({
|
|
|
124916
124961
|
}
|
|
124917
124962
|
});
|
|
124918
124963
|
|
|
124964
|
+
// dist/system-prompts/apiDocLoader.js
|
|
124965
|
+
var require_apiDocLoader = __commonJS({
|
|
124966
|
+
"dist/system-prompts/apiDocLoader.js"(exports2) {
|
|
124967
|
+
"use strict";
|
|
124968
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
124969
|
+
exports2.loadApiDocumentation = loadApiDocumentation;
|
|
124970
|
+
var docLoader_1 = require_docLoader();
|
|
124971
|
+
var API_TO_DOC_MAPPING = {
|
|
124972
|
+
"stores.productsV3.updateProduct": "stores-productsV3-updateProduct-doc.txt",
|
|
124973
|
+
"stores.products.onProductCreated": "stores-productV3-onProductCreated-doc.txt",
|
|
124974
|
+
"data.items.onDataItemCreated": "data-items-onDataItemCreated.txt",
|
|
124975
|
+
"crm.contacts.onContactCreated": "crm-contacts-onContactCreated-doc.txt"
|
|
124976
|
+
};
|
|
124977
|
+
function loadApiDocumentation(apiNames) {
|
|
124978
|
+
return (0, docLoader_1.loadDocumentation)(apiNames, API_TO_DOC_MAPPING, docLoader_1.DocType.API);
|
|
124979
|
+
}
|
|
124980
|
+
}
|
|
124981
|
+
});
|
|
124982
|
+
|
|
124983
|
+
// dist/system-prompts/backendEvent/backendEventPrompt.js
|
|
124984
|
+
var require_backendEventPrompt = __commonJS({
|
|
124985
|
+
"dist/system-prompts/backendEvent/backendEventPrompt.js"(exports2) {
|
|
124986
|
+
"use strict";
|
|
124987
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
124988
|
+
exports2.backendEventPrompt = void 0;
|
|
124989
|
+
var apiDocLoader_1 = require_apiDocLoader();
|
|
124990
|
+
var backendEventPrompt = (apiNames) => {
|
|
124991
|
+
const apiDocs = (0, apiDocLoader_1.loadApiDocumentation)(apiNames);
|
|
124992
|
+
return `<BACKEND_EVENT_PROMPT>
|
|
124993
|
+
<role>
|
|
124994
|
+
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.
|
|
124995
|
+
</role>
|
|
124996
|
+
|
|
124997
|
+
<event_handler_patterns>
|
|
124998
|
+
- Use the correct SDK import for the service (e.g., import { products } from '@wix/stores')
|
|
124999
|
+
- Implement event listeners using the .on[EventName]() pattern
|
|
125000
|
+
- Always use async functions for event handlers
|
|
125001
|
+
- Include proper error handling and logging
|
|
125002
|
+
- Follow Wix backend event naming conventions
|
|
125003
|
+
- Events are triggered automatically when conditions are met
|
|
125004
|
+
</event_handler_patterns>
|
|
125005
|
+
|
|
125006
|
+
<implementation_guidelines>
|
|
125007
|
+
- Import the appropriate SDK module at the top of the file
|
|
125008
|
+
- Use descriptive function names that indicate the event being handled
|
|
125009
|
+
- Include console.log statements for debugging and monitoring
|
|
125010
|
+
- Handle both success and error cases appropriately
|
|
125011
|
+
- Use TypeScript types when available for better type safety
|
|
125012
|
+
- Follow the async/await pattern for any asynchronous operations
|
|
125013
|
+
- CRITICAL: Always check the exact TypeScript type structure before accessing any properties
|
|
125014
|
+
- DO NOT assume event structure - the event parameter type (e.g., ProductCreatedEnvelope) determines available fields
|
|
125015
|
+
- Use TypeScript IntelliSense or check the SDK documentation for the exact property names
|
|
125016
|
+
- ALWAYS check the TypeScript type definition for the exact property names and structure
|
|
125017
|
+
- Common event envelope patterns: event.data, event.metadata (NOT event.entity)
|
|
125018
|
+
- Property names vary by event type - never assume standard names like 'id' or 'name'
|
|
125019
|
+
- When in doubt, log the entire event object first to inspect its structure
|
|
125020
|
+
- DO NOT access any properties without verifying they exist in the type definition
|
|
125021
|
+
- Use optional chaining (?.) for all property access to prevent runtime errors
|
|
125022
|
+
- Reference the corresponding SDK submodule category for event-specific information
|
|
125023
|
+
- Events run automatically when triggered - no manual invocation needed
|
|
125024
|
+
</implementation_guidelines>
|
|
125025
|
+
|
|
125026
|
+
<api_docs>
|
|
125027
|
+
${apiDocs}
|
|
125028
|
+
</api_docs>
|
|
125029
|
+
</BACKEND_EVENT_PROMPT>`;
|
|
125030
|
+
};
|
|
125031
|
+
exports2.backendEventPrompt = backendEventPrompt;
|
|
125032
|
+
}
|
|
125033
|
+
});
|
|
125034
|
+
|
|
125035
|
+
// dist/agents/BackendEventAgent.js
|
|
125036
|
+
var require_BackendEventAgent = __commonJS({
|
|
125037
|
+
"dist/agents/BackendEventAgent.js"(exports2) {
|
|
125038
|
+
"use strict";
|
|
125039
|
+
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
125040
|
+
if (k2 === void 0) k2 = k;
|
|
125041
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
125042
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
125043
|
+
desc = { enumerable: true, get: function() {
|
|
125044
|
+
return m[k];
|
|
125045
|
+
} };
|
|
125046
|
+
}
|
|
125047
|
+
Object.defineProperty(o, k2, desc);
|
|
125048
|
+
}) : (function(o, m, k, k2) {
|
|
125049
|
+
if (k2 === void 0) k2 = k;
|
|
125050
|
+
o[k2] = m[k];
|
|
125051
|
+
}));
|
|
125052
|
+
var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
125053
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
125054
|
+
}) : function(o, v) {
|
|
125055
|
+
o["default"] = v;
|
|
125056
|
+
});
|
|
125057
|
+
var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
|
|
125058
|
+
var ownKeys2 = function(o) {
|
|
125059
|
+
ownKeys2 = Object.getOwnPropertyNames || function(o2) {
|
|
125060
|
+
var ar = [];
|
|
125061
|
+
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
125062
|
+
return ar;
|
|
125063
|
+
};
|
|
125064
|
+
return ownKeys2(o);
|
|
125065
|
+
};
|
|
125066
|
+
return function(mod2) {
|
|
125067
|
+
if (mod2 && mod2.__esModule) return mod2;
|
|
125068
|
+
var result = {};
|
|
125069
|
+
if (mod2 != null) {
|
|
125070
|
+
for (var k = ownKeys2(mod2), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod2, k[i]);
|
|
125071
|
+
}
|
|
125072
|
+
__setModuleDefault2(result, mod2);
|
|
125073
|
+
return result;
|
|
125074
|
+
};
|
|
125075
|
+
})();
|
|
125076
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
125077
|
+
exports2.BackendEventAgent = void 0;
|
|
125078
|
+
var anthropic_1 = require_dist5();
|
|
125079
|
+
var ai_1 = require_dist9();
|
|
125080
|
+
var utils_1 = require_utils14();
|
|
125081
|
+
var backendEventPrompt_1 = require_backendEventPrompt();
|
|
125082
|
+
var load_examples_1 = __importStar2(require_load_examples());
|
|
125083
|
+
var BackendEventAgent = class {
|
|
125084
|
+
constructor(apiKey) {
|
|
125085
|
+
this.apiKey = apiKey;
|
|
125086
|
+
this.name = "BackendEventAgent";
|
|
125087
|
+
}
|
|
125088
|
+
buildSystemPrompt(apiNames = []) {
|
|
125089
|
+
return (0, backendEventPrompt_1.backendEventPrompt)(apiNames);
|
|
125090
|
+
}
|
|
125091
|
+
async generate(params) {
|
|
125092
|
+
const { blueprint } = params;
|
|
125093
|
+
const examples = (0, load_examples_1.default)([load_examples_1.types.BackendEvent]);
|
|
125094
|
+
const allApiNames = params.extension.relatedApis?.map((api) => api.name).filter((name) => !!name) || [];
|
|
125095
|
+
const systemPrompt = `${this.buildSystemPrompt(allApiNames)}
|
|
125096
|
+
${examples}
|
|
125097
|
+
`;
|
|
125098
|
+
const appName = blueprint?.appName ? `'${blueprint.appName}'` : "";
|
|
125099
|
+
const primaryAction = `Customize backend event scaffolding for the app ${appName}`;
|
|
125100
|
+
const userMessage = (0, utils_1.buildUserPromptForCodeGenerationAgent)(params, primaryAction);
|
|
125101
|
+
const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-20250514");
|
|
125102
|
+
const result = await (0, ai_1.generateObject)({
|
|
125103
|
+
model,
|
|
125104
|
+
schema: utils_1.FileSchema,
|
|
125105
|
+
messages: [
|
|
125106
|
+
{
|
|
125107
|
+
role: "system",
|
|
125108
|
+
content: systemPrompt,
|
|
125109
|
+
providerOptions: (0, utils_1.withCaching)("1h")
|
|
125110
|
+
},
|
|
125111
|
+
{
|
|
125112
|
+
role: "user",
|
|
125113
|
+
content: userMessage
|
|
125114
|
+
}
|
|
125115
|
+
],
|
|
125116
|
+
experimental_telemetry: {
|
|
125117
|
+
isEnabled: true,
|
|
125118
|
+
functionId: this.name
|
|
125119
|
+
},
|
|
125120
|
+
maxOutputTokens: 1e4,
|
|
125121
|
+
maxRetries: 3,
|
|
125122
|
+
temperature: 0
|
|
125123
|
+
});
|
|
125124
|
+
return result.object.files;
|
|
125125
|
+
}
|
|
125126
|
+
};
|
|
125127
|
+
exports2.BackendEventAgent = BackendEventAgent;
|
|
125128
|
+
exports2.default = BackendEventAgent;
|
|
125129
|
+
}
|
|
125130
|
+
});
|
|
125131
|
+
|
|
124919
125132
|
// dist/system-prompts/backend/backendApi.js
|
|
124920
125133
|
var require_backendApi = __commonJS({
|
|
124921
125134
|
"dist/system-prompts/backend/backendApi.js"(exports2) {
|
|
@@ -128248,6 +128461,7 @@ var require_AgentsFactory = __commonJS({
|
|
|
128248
128461
|
var CMSAgent_1 = require_CMSAgent();
|
|
128249
128462
|
var CMSDataAgent_1 = require_CMSDataAgent();
|
|
128250
128463
|
var SiteComponentAgent_1 = __importDefault2(require_SiteComponentAgent());
|
|
128464
|
+
var BackendEventAgent_1 = __importDefault2(require_BackendEventAgent());
|
|
128251
128465
|
var BackendApiAgent_1 = require_BackendApiAgent();
|
|
128252
128466
|
var IterationAgent_1 = __importDefault2(require_IterationAgent());
|
|
128253
128467
|
var CustomElementAgent_1 = __importDefault2(require_CustomElementAgent());
|
|
@@ -128279,6 +128493,8 @@ var require_AgentsFactory = __commonJS({
|
|
|
128279
128493
|
return new AutoPatternsGenerator_1.AutoPatternsGenerator();
|
|
128280
128494
|
case types_1.ExtensionType.SITE_COMPONENT:
|
|
128281
128495
|
return new SiteComponentAgent_1.default(this.apiKey);
|
|
128496
|
+
case types_1.ExtensionType.BACKEND_EVENT:
|
|
128497
|
+
return new BackendEventAgent_1.default(this.apiKey);
|
|
128282
128498
|
case types_1.ExtensionType.SITE_WIDGET:
|
|
128283
128499
|
return new CustomElementAgent_1.default(this.apiKey);
|
|
128284
128500
|
case types_1.ExtensionType.BACKEND_API:
|
|
@@ -130869,7 +131085,7 @@ var require_extensionGenerators = __commonJS({
|
|
|
130869
131085
|
const servicePluginType = this.getServicePluginType(extension);
|
|
130870
131086
|
const builderMethod = this.servicePluginBuilderMap[servicePluginType];
|
|
130871
131087
|
const extensionConfig = this.createServicePluginData(name, scaffoldDir, id, servicePluginType);
|
|
130872
|
-
writeExtensionFile({
|
|
131088
|
+
return writeExtensionFile({
|
|
130873
131089
|
outputPath,
|
|
130874
131090
|
name,
|
|
130875
131091
|
builderMethodName: builderMethod,
|
|
@@ -130877,12 +131093,11 @@ var require_extensionGenerators = __commonJS({
|
|
|
130877
131093
|
extensionType: extension.type,
|
|
130878
131094
|
scaffoldDir
|
|
130879
131095
|
});
|
|
130880
|
-
break;
|
|
130881
131096
|
}
|
|
130882
131097
|
case types_1.ExtensionType.DASHBOARD_PAGE: {
|
|
130883
131098
|
const name = extension.name || "My Backoffice Page";
|
|
130884
131099
|
const extensionConfig = this.createDashboardPageData(id, name, scaffoldDir);
|
|
130885
|
-
writeExtensionFile({
|
|
131100
|
+
return writeExtensionFile({
|
|
130886
131101
|
outputPath,
|
|
130887
131102
|
name,
|
|
130888
131103
|
builderMethodName: "backofficePage",
|
|
@@ -130890,12 +131105,11 @@ var require_extensionGenerators = __commonJS({
|
|
|
130890
131105
|
extensionType: extension.type,
|
|
130891
131106
|
scaffoldDir
|
|
130892
131107
|
});
|
|
130893
|
-
break;
|
|
130894
131108
|
}
|
|
130895
131109
|
case types_1.ExtensionType.SITE_COMPONENT: {
|
|
130896
131110
|
const name = extension.name || "My Site Component";
|
|
130897
131111
|
const extensionConfig = this.createSiteComponentData(name, scaffoldDir, id);
|
|
130898
|
-
writeExtensionFile({
|
|
131112
|
+
return writeExtensionFile({
|
|
130899
131113
|
outputPath,
|
|
130900
131114
|
name,
|
|
130901
131115
|
builderMethodName: "siteComponent",
|
|
@@ -130903,12 +131117,11 @@ var require_extensionGenerators = __commonJS({
|
|
|
130903
131117
|
extensionType: extension.type,
|
|
130904
131118
|
scaffoldDir
|
|
130905
131119
|
});
|
|
130906
|
-
break;
|
|
130907
131120
|
}
|
|
130908
131121
|
case types_1.ExtensionType.SITE_WIDGET: {
|
|
130909
131122
|
const name = extension.name || "My Site Widget";
|
|
130910
131123
|
const extensionConfig = this.createCustomElementData(id, name, scaffoldDir);
|
|
130911
|
-
writeExtensionFile({
|
|
131124
|
+
return writeExtensionFile({
|
|
130912
131125
|
outputPath,
|
|
130913
131126
|
name,
|
|
130914
131127
|
builderMethodName: "customElement",
|
|
@@ -130916,7 +131129,6 @@ var require_extensionGenerators = __commonJS({
|
|
|
130916
131129
|
extensionType: extension.type,
|
|
130917
131130
|
scaffoldDir
|
|
130918
131131
|
});
|
|
130919
|
-
break;
|
|
130920
131132
|
}
|
|
130921
131133
|
case types_1.ExtensionType.EMBEDDED_SCRIPT: {
|
|
130922
131134
|
const name = extension.name || "My Embedded Script";
|
|
@@ -130925,7 +131137,7 @@ var require_extensionGenerators = __commonJS({
|
|
|
130925
131137
|
scriptType: EmbeddedScriptAgent_1.EmbeddedScriptType.ESSENTIAL
|
|
130926
131138
|
};
|
|
130927
131139
|
const extensionConfig = this.createEmbeddedScriptData(id, name, scaffoldDir, placement, scriptType);
|
|
130928
|
-
writeExtensionFile({
|
|
131140
|
+
return writeExtensionFile({
|
|
130929
131141
|
outputPath,
|
|
130930
131142
|
name,
|
|
130931
131143
|
builderMethodName: "embeddedScript",
|
|
@@ -130933,12 +131145,48 @@ var require_extensionGenerators = __commonJS({
|
|
|
130933
131145
|
extensionType: extension.type,
|
|
130934
131146
|
scaffoldDir
|
|
130935
131147
|
});
|
|
130936
|
-
break;
|
|
130937
131148
|
}
|
|
131149
|
+
case types_1.ExtensionType.BACKEND_EVENT: {
|
|
131150
|
+
const name = extension.name || "My Backend Event";
|
|
131151
|
+
const extensionConfig = this.createBackendEventData(id, extension.relatedApis || [], scaffoldDir);
|
|
131152
|
+
return writeExtensionFile({
|
|
131153
|
+
outputPath,
|
|
131154
|
+
name,
|
|
131155
|
+
builderMethodName: "webhook",
|
|
131156
|
+
extensionConfig,
|
|
131157
|
+
extensionType: extension.type,
|
|
131158
|
+
scaffoldDir
|
|
131159
|
+
});
|
|
131160
|
+
}
|
|
131161
|
+
case types_1.ExtensionType.BACKEND_API:
|
|
131162
|
+
case types_1.ExtensionType.WEBHOOK:
|
|
131163
|
+
case types_1.ExtensionType.WEB_METHODS:
|
|
131164
|
+
case types_1.ExtensionType.DASHBOARD_PLUGIN:
|
|
131165
|
+
case types_1.ExtensionType.DASHBOARD_MODAL:
|
|
131166
|
+
return null;
|
|
130938
131167
|
default:
|
|
130939
131168
|
console.log(`Skipping extension type: ${extension.type}. It doesn't need presence in the extensions.ts file (e.g. Backend API is astro only)`);
|
|
130940
|
-
return;
|
|
131169
|
+
return null;
|
|
131170
|
+
}
|
|
131171
|
+
}
|
|
131172
|
+
static createBackendEventData(id, relatedApis, scaffoldDir) {
|
|
131173
|
+
const slug = this.getSlugFromBlueprint(relatedApis || []);
|
|
131174
|
+
const source = getScaffoldPath(scaffoldDir, "event.ts");
|
|
131175
|
+
return { id, slug, source };
|
|
131176
|
+
}
|
|
131177
|
+
static getSlugFromBlueprint(relatedApis) {
|
|
131178
|
+
if (!Array.isArray(relatedApis) || relatedApis.length === 0) {
|
|
131179
|
+
throw new Error("Backend event extension must have at least one related API");
|
|
130941
131180
|
}
|
|
131181
|
+
for (const api of relatedApis) {
|
|
131182
|
+
const apiName = api?.name;
|
|
131183
|
+
if (!apiName)
|
|
131184
|
+
continue;
|
|
131185
|
+
const slug = this.apiToSlug[apiName];
|
|
131186
|
+
if (slug)
|
|
131187
|
+
return slug;
|
|
131188
|
+
}
|
|
131189
|
+
throw new Error("No valid slug found for backend event");
|
|
130942
131190
|
}
|
|
130943
131191
|
static getServicePluginType(ext) {
|
|
130944
131192
|
if (!ext.relatedSpis || ext.relatedSpis.length !== 1) {
|
|
@@ -130951,7 +131199,7 @@ var require_extensionGenerators = __commonJS({
|
|
|
130951
131199
|
throw new Error("No valid service plugin type found for service plugin");
|
|
130952
131200
|
}
|
|
130953
131201
|
static createServicePluginData(name, scaffoldDir, id, servicePluginType) {
|
|
130954
|
-
const source =
|
|
131202
|
+
const source = getScaffoldPath(scaffoldDir, "plugin.ts");
|
|
130955
131203
|
switch (servicePluginType) {
|
|
130956
131204
|
case "ecom-shipping-rates":
|
|
130957
131205
|
return {
|
|
@@ -130975,7 +131223,7 @@ var require_extensionGenerators = __commonJS({
|
|
|
130975
131223
|
}
|
|
130976
131224
|
static createDashboardPageData(id, name, scaffoldDir) {
|
|
130977
131225
|
const routePath = name.toLowerCase().replace(/\s+/g, "-");
|
|
130978
|
-
const component =
|
|
131226
|
+
const component = getScaffoldPath(scaffoldDir, "page.tsx");
|
|
130979
131227
|
return {
|
|
130980
131228
|
id,
|
|
130981
131229
|
title: name,
|
|
@@ -130985,7 +131233,7 @@ var require_extensionGenerators = __commonJS({
|
|
|
130985
131233
|
}
|
|
130986
131234
|
static createCustomElementData(id, name, scaffoldDir) {
|
|
130987
131235
|
const kebabCaseComponentName = (0, ditto_scaffolding_2.toKebabCase)(name);
|
|
130988
|
-
const componentPath =
|
|
131236
|
+
const componentPath = getScaffoldPath(scaffoldDir, "widget.tsx");
|
|
130989
131237
|
return {
|
|
130990
131238
|
id,
|
|
130991
131239
|
name,
|
|
@@ -131000,7 +131248,7 @@ var require_extensionGenerators = __commonJS({
|
|
|
131000
131248
|
}
|
|
131001
131249
|
static createSiteComponentData(name, scaffoldDir, id) {
|
|
131002
131250
|
const kebabCaseComponentName = (0, ditto_scaffolding_2.toKebabCase)(name);
|
|
131003
|
-
const componentPath =
|
|
131251
|
+
const componentPath = getScaffoldPath(scaffoldDir, "component.tsx");
|
|
131004
131252
|
return {
|
|
131005
131253
|
id,
|
|
131006
131254
|
description: name,
|
|
@@ -131017,7 +131265,7 @@ var require_extensionGenerators = __commonJS({
|
|
|
131017
131265
|
};
|
|
131018
131266
|
}
|
|
131019
131267
|
static createEmbeddedScriptData(id, name, scaffoldDir, placement, scriptType) {
|
|
131020
|
-
const source =
|
|
131268
|
+
const source = getScaffoldPath(scaffoldDir, "embedded.html");
|
|
131021
131269
|
return {
|
|
131022
131270
|
id,
|
|
131023
131271
|
name,
|
|
@@ -131036,6 +131284,14 @@ var require_extensionGenerators = __commonJS({
|
|
|
131036
131284
|
"gift-cards-provider": "ecomGiftCardsProvider",
|
|
131037
131285
|
"ecom-payment-settings": "ecomPaymentSettings"
|
|
131038
131286
|
};
|
|
131287
|
+
ExtensionFactory.apiToSlug = {
|
|
131288
|
+
"stores.productsV3.onProductCreated": "wix.stores.catalog.v3.product_created",
|
|
131289
|
+
"crm.contacts.onContactCreated": "wix.contacts.v4.contact_created",
|
|
131290
|
+
"data.items.onDataItemCreated": "wix.data.v2.data_item_created"
|
|
131291
|
+
};
|
|
131292
|
+
function getScaffoldPath(scaffoldDir, file) {
|
|
131293
|
+
return "./" + path_1.default.join(scaffoldDir, file).replace(/^src\//, "");
|
|
131294
|
+
}
|
|
131039
131295
|
function writeExtensionFile({ outputPath, name, builderMethodName, extensionConfig, extensionType, scaffoldDir }) {
|
|
131040
131296
|
const sanitizedName = name.replace(/[^a-zA-Z0-9\s-_]/g, "").trim();
|
|
131041
131297
|
if (!sanitizedName) {
|
|
@@ -137665,6 +137921,64 @@ export default appBuilder;
|
|
|
137665
137921
|
}
|
|
137666
137922
|
});
|
|
137667
137923
|
|
|
137924
|
+
// dist/file-collector.js
|
|
137925
|
+
var require_file_collector = __commonJS({
|
|
137926
|
+
"dist/file-collector.js"(exports2) {
|
|
137927
|
+
"use strict";
|
|
137928
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod2) {
|
|
137929
|
+
return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
|
|
137930
|
+
};
|
|
137931
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
137932
|
+
exports2.captureExistingFiles = captureExistingFiles;
|
|
137933
|
+
exports2.determineFileOperation = determineFileOperation;
|
|
137934
|
+
exports2.collectAllCreatedFiles = collectAllCreatedFiles;
|
|
137935
|
+
var fs_1 = __importDefault2(require("fs"));
|
|
137936
|
+
var path_1 = __importDefault2(require("path"));
|
|
137937
|
+
function captureExistingFiles(filePaths, outputPath) {
|
|
137938
|
+
const existingFiles = /* @__PURE__ */ new Set();
|
|
137939
|
+
filePaths.forEach((filePath) => {
|
|
137940
|
+
const fullPath = path_1.default.join(outputPath, filePath);
|
|
137941
|
+
if (fs_1.default.existsSync(fullPath)) {
|
|
137942
|
+
existingFiles.add(fullPath);
|
|
137943
|
+
}
|
|
137944
|
+
});
|
|
137945
|
+
return existingFiles;
|
|
137946
|
+
}
|
|
137947
|
+
function determineFileOperation(filePath, outputPath, existingFiles) {
|
|
137948
|
+
const fullPath = path_1.default.join(outputPath, filePath);
|
|
137949
|
+
return existingFiles.has(fullPath) ? "update" : "insert";
|
|
137950
|
+
}
|
|
137951
|
+
function collectAllCreatedFiles(options) {
|
|
137952
|
+
const { scaffolds = [], agentFiles, extensionFilePath, outputPath, existingFiles } = options;
|
|
137953
|
+
const allCreatedFiles = [];
|
|
137954
|
+
scaffolds.forEach((s) => {
|
|
137955
|
+
allCreatedFiles.push({
|
|
137956
|
+
path: s.path,
|
|
137957
|
+
operation: "insert",
|
|
137958
|
+
// Scaffolds are always new files
|
|
137959
|
+
content: s.content
|
|
137960
|
+
});
|
|
137961
|
+
});
|
|
137962
|
+
agentFiles.forEach((file) => {
|
|
137963
|
+
const hasScaffold = scaffolds.some((s) => s.path === file.path);
|
|
137964
|
+
allCreatedFiles.push({
|
|
137965
|
+
...file,
|
|
137966
|
+
operation: hasScaffold ? "insert" : determineFileOperation(file.path || "", outputPath, existingFiles)
|
|
137967
|
+
});
|
|
137968
|
+
});
|
|
137969
|
+
if (extensionFilePath) {
|
|
137970
|
+
allCreatedFiles.push({
|
|
137971
|
+
path: extensionFilePath,
|
|
137972
|
+
operation: determineFileOperation(extensionFilePath, outputPath, existingFiles),
|
|
137973
|
+
content: fs_1.default.readFileSync(path_1.default.join(outputPath, extensionFilePath), "utf-8")
|
|
137974
|
+
});
|
|
137975
|
+
}
|
|
137976
|
+
const uniqueFiles = Array.from(new Map(allCreatedFiles.map((file) => [file.path, file])).values());
|
|
137977
|
+
return uniqueFiles;
|
|
137978
|
+
}
|
|
137979
|
+
}
|
|
137980
|
+
});
|
|
137981
|
+
|
|
137668
137982
|
// dist/orchestrator.js
|
|
137669
137983
|
var require_orchestrator = __commonJS({
|
|
137670
137984
|
"dist/orchestrator.js"(exports2) {
|
|
@@ -137684,6 +137998,7 @@ var require_orchestrator = __commonJS({
|
|
|
137684
137998
|
var FixerFactory_1 = __importDefault2(require_FixerFactory());
|
|
137685
137999
|
var extensionGenerators_1 = require_extensionGenerators();
|
|
137686
138000
|
var extensionIndexer_1 = require_extensionIndexer();
|
|
138001
|
+
var file_collector_1 = require_file_collector();
|
|
137687
138002
|
var MAX_ERRORS_PER_BATCH = 20;
|
|
137688
138003
|
var DittoOrchestrator = class extends events_1.EventEmitter {
|
|
137689
138004
|
constructor(agentsFactory, apiKey) {
|
|
@@ -137699,6 +138014,41 @@ var require_orchestrator = __commonJS({
|
|
|
137699
138014
|
emitEvent(event, payload) {
|
|
137700
138015
|
return super.emit(event, payload);
|
|
137701
138016
|
}
|
|
138017
|
+
/**
|
|
138018
|
+
* Finalize the code generation for an extension by:
|
|
138019
|
+
* 1. Capturing which files existed before generation
|
|
138020
|
+
* 2. Writing the generated files to disk
|
|
138021
|
+
* 3. Generating the extension registration file
|
|
138022
|
+
* 4. Collecting all created files with correct operation types
|
|
138023
|
+
* 5. Emitting the agent:done event
|
|
138024
|
+
*
|
|
138025
|
+
* This wraps the common pattern used in all process* methods.
|
|
138026
|
+
*/
|
|
138027
|
+
finalizeExtensionGeneration(options) {
|
|
138028
|
+
const { extension, agentName, agentFiles, scaffolds = [], scaffoldPath, outputPath, generatedConfig } = options;
|
|
138029
|
+
const filesToCheck = agentFiles.map((f) => f.path || "");
|
|
138030
|
+
const existingFiles = (0, file_collector_1.captureExistingFiles)(filesToCheck, outputPath);
|
|
138031
|
+
this.writeFile(agentFiles, outputPath);
|
|
138032
|
+
const extensionFilePath = extensionGenerators_1.ExtensionFactory.generateExtension({
|
|
138033
|
+
extension,
|
|
138034
|
+
outputPath,
|
|
138035
|
+
scaffoldPath,
|
|
138036
|
+
generatedConfig
|
|
138037
|
+
});
|
|
138038
|
+
const allCreatedFiles = (0, file_collector_1.collectAllCreatedFiles)({
|
|
138039
|
+
scaffolds,
|
|
138040
|
+
agentFiles,
|
|
138041
|
+
extensionFilePath,
|
|
138042
|
+
outputPath,
|
|
138043
|
+
existingFiles
|
|
138044
|
+
});
|
|
138045
|
+
this.emitEvent("agent:done", {
|
|
138046
|
+
extension,
|
|
138047
|
+
name: agentName,
|
|
138048
|
+
files: allCreatedFiles
|
|
138049
|
+
});
|
|
138050
|
+
return extensionFilePath;
|
|
138051
|
+
}
|
|
137702
138052
|
writeFile(files, outputPath) {
|
|
137703
138053
|
if (!files) {
|
|
137704
138054
|
console.warn("\u26A0\uFE0F Skipping file operation: no files provided");
|
|
@@ -137852,22 +138202,19 @@ var require_orchestrator = __commonJS({
|
|
|
137852
138202
|
basePath: outputPath,
|
|
137853
138203
|
planAndResources
|
|
137854
138204
|
});
|
|
137855
|
-
this.
|
|
137856
|
-
extensionGenerators_1.ExtensionFactory.generateExtension({
|
|
138205
|
+
this.finalizeExtensionGeneration({
|
|
137857
138206
|
extension,
|
|
137858
|
-
|
|
138207
|
+
agentName: embeddedScriptAgent.name,
|
|
138208
|
+
agentFiles: files,
|
|
138209
|
+
scaffolds: [scaffold],
|
|
137859
138210
|
scaffoldPath: scaffold.path,
|
|
138211
|
+
outputPath,
|
|
137860
138212
|
generatedConfig: {
|
|
137861
138213
|
type: types_1.ExtensionType.EMBEDDED_SCRIPT,
|
|
137862
138214
|
scriptType,
|
|
137863
138215
|
placement
|
|
137864
138216
|
}
|
|
137865
138217
|
});
|
|
137866
|
-
this.emitEvent("agent:done", {
|
|
137867
|
-
extension,
|
|
137868
|
-
name: embeddedScriptAgent.name,
|
|
137869
|
-
files
|
|
137870
|
-
});
|
|
137871
138218
|
}
|
|
137872
138219
|
async processDashboardPage(opts) {
|
|
137873
138220
|
const { extension, blueprint, outputPath, planAndResources } = opts;
|
|
@@ -137903,17 +138250,13 @@ var require_orchestrator = __commonJS({
|
|
|
137903
138250
|
decision,
|
|
137904
138251
|
extensionName: extension.name || ""
|
|
137905
138252
|
});
|
|
137906
|
-
this.writeFile(files, outputPath);
|
|
137907
138253
|
const pagePath = files[0].path || "";
|
|
137908
|
-
|
|
138254
|
+
this.finalizeExtensionGeneration({
|
|
137909
138255
|
extension,
|
|
137910
|
-
|
|
137911
|
-
|
|
137912
|
-
|
|
137913
|
-
|
|
137914
|
-
extension,
|
|
137915
|
-
name: "AutoPatternsGenerator",
|
|
137916
|
-
files
|
|
138256
|
+
agentName: "AutoPatternsGenerator",
|
|
138257
|
+
agentFiles: files,
|
|
138258
|
+
scaffoldPath: pagePath,
|
|
138259
|
+
outputPath
|
|
137917
138260
|
});
|
|
137918
138261
|
}
|
|
137919
138262
|
async processServicePlugin({ extension, blueprint, outputPath, planAndResources }) {
|
|
@@ -137945,13 +138288,14 @@ var require_orchestrator = __commonJS({
|
|
|
137945
138288
|
planAndResources,
|
|
137946
138289
|
basePath: outputPath
|
|
137947
138290
|
});
|
|
137948
|
-
this.
|
|
137949
|
-
extensionGenerators_1.ExtensionFactory.generateExtension({
|
|
138291
|
+
this.finalizeExtensionGeneration({
|
|
137950
138292
|
extension,
|
|
137951
|
-
|
|
137952
|
-
|
|
138293
|
+
agentName: agent.name,
|
|
138294
|
+
agentFiles: files,
|
|
138295
|
+
scaffolds,
|
|
138296
|
+
scaffoldPath: scaffold.path,
|
|
138297
|
+
outputPath
|
|
137953
138298
|
});
|
|
137954
|
-
this.emitEvent("agent:done", { extension, name: agent.name, files });
|
|
137955
138299
|
}
|
|
137956
138300
|
async processStandardExtension({ extension, blueprint, outputPath, planAndResources }) {
|
|
137957
138301
|
this.emitEvent("scaffold:start", { extension });
|
|
@@ -137973,13 +138317,14 @@ var require_orchestrator = __commonJS({
|
|
|
137973
138317
|
planAndResources,
|
|
137974
138318
|
basePath: outputPath
|
|
137975
138319
|
});
|
|
137976
|
-
this.
|
|
137977
|
-
extensionGenerators_1.ExtensionFactory.generateExtension({
|
|
138320
|
+
this.finalizeExtensionGeneration({
|
|
137978
138321
|
extension,
|
|
137979
|
-
|
|
137980
|
-
|
|
138322
|
+
agentName: agent.name,
|
|
138323
|
+
agentFiles: files,
|
|
138324
|
+
scaffolds,
|
|
138325
|
+
scaffoldPath: scaffold.path,
|
|
138326
|
+
outputPath
|
|
137981
138327
|
});
|
|
137982
|
-
this.emitEvent("agent:done", { extension, name: agent.name, files });
|
|
137983
138328
|
}
|
|
137984
138329
|
async processMultipleServicePluginScaffolds({ extension, blueprint, outputPath, planAndResources, scaffolds }) {
|
|
137985
138330
|
if (!extension.relatedSpis || extension.relatedSpis.length === 0) {
|
|
@@ -138006,16 +138351,13 @@ var require_orchestrator = __commonJS({
|
|
|
138006
138351
|
planAndResources,
|
|
138007
138352
|
basePath: outputPath
|
|
138008
138353
|
});
|
|
138009
|
-
this.
|
|
138010
|
-
extensionGenerators_1.ExtensionFactory.generateExtension({
|
|
138011
|
-
extension: spiExtension,
|
|
138012
|
-
outputPath,
|
|
138013
|
-
scaffoldPath: scaffold.path
|
|
138014
|
-
});
|
|
138015
|
-
this.emitEvent("agent:done", {
|
|
138354
|
+
this.finalizeExtensionGeneration({
|
|
138016
138355
|
extension: spiExtension,
|
|
138017
|
-
|
|
138018
|
-
files
|
|
138356
|
+
agentName: agent.name,
|
|
138357
|
+
agentFiles: files,
|
|
138358
|
+
scaffolds: [scaffold],
|
|
138359
|
+
scaffoldPath: scaffold.path,
|
|
138360
|
+
outputPath
|
|
138019
138361
|
});
|
|
138020
138362
|
});
|
|
138021
138363
|
await Promise.all(parallelTasks);
|
|
@@ -138052,16 +138394,13 @@ var require_orchestrator = __commonJS({
|
|
|
138052
138394
|
relevantFilePaths: paths,
|
|
138053
138395
|
basePath: outputPath
|
|
138054
138396
|
});
|
|
138055
|
-
this.
|
|
138056
|
-
extensionGenerators_1.ExtensionFactory.generateExtension({
|
|
138397
|
+
this.finalizeExtensionGeneration({
|
|
138057
138398
|
extension,
|
|
138058
|
-
|
|
138059
|
-
|
|
138060
|
-
|
|
138061
|
-
|
|
138062
|
-
|
|
138063
|
-
name: agent.name,
|
|
138064
|
-
files
|
|
138399
|
+
agentName: agent.name,
|
|
138400
|
+
agentFiles: files,
|
|
138401
|
+
scaffolds,
|
|
138402
|
+
scaffoldPath: scaffold.path,
|
|
138403
|
+
outputPath
|
|
138065
138404
|
});
|
|
138066
138405
|
} else {
|
|
138067
138406
|
const agent = this.agentsFactory.getAgent(extension);
|