@wix/ditto-codegen-public 1.0.367 → 1.0.369
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 +477 -5
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -555,6 +555,7 @@ var require_context = __commonJS({
|
|
|
555
555
|
appNamespace: process.env.APP_NAMESPACE,
|
|
556
556
|
codeIdentifier: process.env.CODE_IDENTIFIER,
|
|
557
557
|
metasiteId: process.env.METASITE_ID,
|
|
558
|
+
siteBranchId: process.env.SITE_BRANCH_ID,
|
|
558
559
|
hasActiveJobs: () => {
|
|
559
560
|
return Object.keys(exports2.ctx.activeJobs).some((jobId) => exports2.ctx.activeJobs[jobId] === types_1.Status.RUNNING);
|
|
560
561
|
},
|
|
@@ -11498,6 +11499,67 @@ var require_rules_writer = __commonJS({
|
|
|
11498
11499
|
}
|
|
11499
11500
|
});
|
|
11500
11501
|
|
|
11502
|
+
// dist/opencode-integration/node-modules-guard.js
|
|
11503
|
+
var require_node_modules_guard = __commonJS({
|
|
11504
|
+
"dist/opencode-integration/node-modules-guard.js"(exports2) {
|
|
11505
|
+
"use strict";
|
|
11506
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11507
|
+
exports2.GUARD_PLUGIN_PATH = exports2.GUARD_MESSAGE = exports2.MAX_SPELUNK_CALLS = void 0;
|
|
11508
|
+
exports2.isSpelunkCommand = isSpelunkCommand;
|
|
11509
|
+
exports2.buildGuardPluginSource = buildGuardPluginSource;
|
|
11510
|
+
exports2.writeGuardPlugin = writeGuardPlugin;
|
|
11511
|
+
var promises_1 = require("fs/promises");
|
|
11512
|
+
var os_1 = require("os");
|
|
11513
|
+
var path_1 = require("path");
|
|
11514
|
+
var logger_12 = require_logger();
|
|
11515
|
+
var READ_VERB_RE = /(^|[\s|;&(])(grep|rg|cat|head|tail|sed|awk|less|more|strings|find)\b/;
|
|
11516
|
+
var SDK_INTERNALS_RE = /node_modules\/(@wix|vite|astro)\b/;
|
|
11517
|
+
exports2.MAX_SPELUNK_CALLS = 2;
|
|
11518
|
+
exports2.GUARD_MESSAGE = `BLOCKED: node_modules is not a documentation source, and the exploratory budget (${exports2.MAX_SPELUNK_CALLS} lookups) is used up. The API you are hunting is already documented:
|
|
11519
|
+
- Wix Data items CRUD: import { items } from "@wix/data" (items.query/get/insert/update/remove).
|
|
11520
|
+
- Dashboard host SDK (toasts, navigation): import { dashboard } from "@wix/dashboard".
|
|
11521
|
+
For anything more (CSS-module/asset typing, component config, etc.), re-read the wix-app skill's references with batch-read, or call SearchWixSDKDocumentation / ReadFullDocsMethodSchema. Do not retry this command.`;
|
|
11522
|
+
function isSpelunkCommand(command) {
|
|
11523
|
+
return READ_VERB_RE.test(command) && SDK_INTERNALS_RE.test(command);
|
|
11524
|
+
}
|
|
11525
|
+
var GLOBAL_PLUGIN_DIR = (0, path_1.join)((0, os_1.homedir)(), ".config", "opencode", "plugin");
|
|
11526
|
+
var GUARD_PLUGIN_FILENAME = "node-modules-guard.ts";
|
|
11527
|
+
exports2.GUARD_PLUGIN_PATH = (0, path_1.join)(GLOBAL_PLUGIN_DIR, GUARD_PLUGIN_FILENAME);
|
|
11528
|
+
function buildGuardPluginSource() {
|
|
11529
|
+
return `// Generated by @wix/ditto-codegen (node-modules-guard) \u2014 do not edit.
|
|
11530
|
+
const READ_VERB_RE = /${READ_VERB_RE.source}/;
|
|
11531
|
+
const SDK_INTERNALS_RE = /${SDK_INTERNALS_RE.source}/;
|
|
11532
|
+
const MAX_SPELUNK_CALLS = ${exports2.MAX_SPELUNK_CALLS};
|
|
11533
|
+
const GUARD_MESSAGE = ${JSON.stringify(exports2.GUARD_MESSAGE)};
|
|
11534
|
+
|
|
11535
|
+
let spelunkCalls = 0;
|
|
11536
|
+
|
|
11537
|
+
export const NodeModulesGuard = async () => ({
|
|
11538
|
+
"tool.execute.before": async (
|
|
11539
|
+
input: { tool: string },
|
|
11540
|
+
output: { args: { command?: string } },
|
|
11541
|
+
) => {
|
|
11542
|
+
if (input.tool !== "bash") return;
|
|
11543
|
+
const command = output.args?.command ?? "";
|
|
11544
|
+
if (!READ_VERB_RE.test(command) || !SDK_INTERNALS_RE.test(command)) return;
|
|
11545
|
+
spelunkCalls += 1;
|
|
11546
|
+
if (spelunkCalls > MAX_SPELUNK_CALLS) {
|
|
11547
|
+
throw new Error(GUARD_MESSAGE);
|
|
11548
|
+
}
|
|
11549
|
+
},
|
|
11550
|
+
});
|
|
11551
|
+
`;
|
|
11552
|
+
}
|
|
11553
|
+
async function writeGuardPlugin() {
|
|
11554
|
+
await (0, promises_1.mkdir)(GLOBAL_PLUGIN_DIR, { recursive: true });
|
|
11555
|
+
await (0, promises_1.writeFile)(exports2.GUARD_PLUGIN_PATH, buildGuardPluginSource(), "utf-8");
|
|
11556
|
+
logger_12.logger.info("[OpenCode] Wrote node_modules guard plugin", {
|
|
11557
|
+
path: exports2.GUARD_PLUGIN_PATH
|
|
11558
|
+
});
|
|
11559
|
+
}
|
|
11560
|
+
}
|
|
11561
|
+
});
|
|
11562
|
+
|
|
11501
11563
|
// ../../node_modules/@wix/ambassador-ctp-ditto-v1-blueprint/cjs/build/types.impl.js
|
|
11502
11564
|
var require_types_impl2 = __commonJS({
|
|
11503
11565
|
"../../node_modules/@wix/ambassador-ctp-ditto-v1-blueprint/cjs/build/types.impl.js"(exports2) {
|
|
@@ -12028,6 +12090,396 @@ var require_http_impl2 = __commonJS({
|
|
|
12028
12090
|
}
|
|
12029
12091
|
});
|
|
12030
12092
|
|
|
12093
|
+
// ../../node_modules/@wix/ambassador-code-project-orchestrator-v1-code-project/cjs/build/http.impl.js
|
|
12094
|
+
var require_http_impl3 = __commonJS({
|
|
12095
|
+
"../../node_modules/@wix/ambassador-code-project-orchestrator-v1-code-project/cjs/build/http.impl.js"(exports2) {
|
|
12096
|
+
"use strict";
|
|
12097
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12098
|
+
exports2.initialize = initialize;
|
|
12099
|
+
exports2.getCodeProjectInfo = getCodeProjectInfo;
|
|
12100
|
+
exports2.startDevSession = startDevSession;
|
|
12101
|
+
exports2.startDevSessionTest = startDevSessionTest;
|
|
12102
|
+
exports2.getDevSessionStatus = getDevSessionStatus;
|
|
12103
|
+
exports2.stopDevSession = stopDevSession;
|
|
12104
|
+
exports2.createCheckpoint = createCheckpoint;
|
|
12105
|
+
exports2.restoreRevision = restoreRevision;
|
|
12106
|
+
exports2.createRevision = createRevision;
|
|
12107
|
+
exports2.createCodeGenerationJob = createCodeGenerationJob;
|
|
12108
|
+
exports2.commitDevOverride = commitDevOverride;
|
|
12109
|
+
exports2.registerDevSchemas = registerDevSchemas;
|
|
12110
|
+
exports2.generateDashboardPage = generateDashboardPage;
|
|
12111
|
+
exports2.getCodeGenerationJobStatus = getCodeGenerationJobStatus;
|
|
12112
|
+
var metro_runtime_1 = require_build();
|
|
12113
|
+
var ambassador_1 = require_ambassador_index();
|
|
12114
|
+
var metro_runtime_2 = require_build();
|
|
12115
|
+
var _commitDevOverrideRequest = {};
|
|
12116
|
+
var _commitDevOverrideResponse = {};
|
|
12117
|
+
var _createCheckpointRequest = {};
|
|
12118
|
+
var _createCheckpointResponse = {};
|
|
12119
|
+
var _createCodeGenerationJobRequest = {};
|
|
12120
|
+
var _createCodeGenerationJobResponse = {};
|
|
12121
|
+
var _createRevisionRequest = {};
|
|
12122
|
+
var _createRevisionResponse = {};
|
|
12123
|
+
var _generateDashboardPageRequest = {};
|
|
12124
|
+
var _generateDashboardPageResponse = {};
|
|
12125
|
+
var _getCodeGenerationJobStatusRequest = {};
|
|
12126
|
+
var _getCodeGenerationJobStatusResponse = {};
|
|
12127
|
+
var _getCodeProjectInfoRequest = {};
|
|
12128
|
+
var _getCodeProjectInfoResponse = {};
|
|
12129
|
+
var _getDevSessionStatusRequest = {};
|
|
12130
|
+
var _getDevSessionStatusResponse = { tasks: "_task" };
|
|
12131
|
+
var _initializeRequest = {};
|
|
12132
|
+
var _initializeResponse = {};
|
|
12133
|
+
var _registerDevSchemasRequest = {};
|
|
12134
|
+
var _registerDevSchemasResponse = {};
|
|
12135
|
+
var _restoreRevisionRequest = {};
|
|
12136
|
+
var _restoreRevisionResponse = {};
|
|
12137
|
+
var _startDevSessionRequest = {};
|
|
12138
|
+
var _startDevSessionResponse = {};
|
|
12139
|
+
var _startDevSessionTestRequest = {};
|
|
12140
|
+
var _startDevSessionTestResponse = {};
|
|
12141
|
+
var _stopDevSessionRequest = {};
|
|
12142
|
+
var _stopDevSessionResponse = {};
|
|
12143
|
+
var _task = { info: "_taskInfo", options: "_taskOptions" };
|
|
12144
|
+
var _taskInfo = {
|
|
12145
|
+
durationMs: "google.protobuf.DoubleValue",
|
|
12146
|
+
startedAt: "google.protobuf.Timestamp",
|
|
12147
|
+
completedAt: "google.protobuf.Timestamp"
|
|
12148
|
+
};
|
|
12149
|
+
var _taskOptions = { onFailure: "_task" };
|
|
12150
|
+
function resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl(opts) {
|
|
12151
|
+
var domainToMappings = {};
|
|
12152
|
+
return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
12153
|
+
}
|
|
12154
|
+
function initialize(payload) {
|
|
12155
|
+
var _a = (0, ambassador_1.serializer)(_initializeRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12156
|
+
var fromRes = (0, ambassador_1.serializer)(_initializeResponse, {}).fromJSON;
|
|
12157
|
+
function __initialize(_a2) {
|
|
12158
|
+
var host = _a2.host;
|
|
12159
|
+
var serializedData = toReq(payload);
|
|
12160
|
+
var metadata = {
|
|
12161
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12162
|
+
method: "POST",
|
|
12163
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.Initialize",
|
|
12164
|
+
migrationOptions: {
|
|
12165
|
+
optInTransformResponse: true
|
|
12166
|
+
},
|
|
12167
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/initialize", data: serializedData, host }),
|
|
12168
|
+
data: serializedData,
|
|
12169
|
+
transformResponse: fromRes
|
|
12170
|
+
};
|
|
12171
|
+
return metadata;
|
|
12172
|
+
}
|
|
12173
|
+
__initialize.fromReq = fromReq;
|
|
12174
|
+
__initialize.__isAmbassador = true;
|
|
12175
|
+
return __initialize;
|
|
12176
|
+
}
|
|
12177
|
+
function getCodeProjectInfo(payload) {
|
|
12178
|
+
var _a = (0, ambassador_1.serializer)(_getCodeProjectInfoRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12179
|
+
var fromRes = (0, ambassador_1.serializer)(_getCodeProjectInfoResponse, {}).fromJSON;
|
|
12180
|
+
function __getCodeProjectInfo(_a2) {
|
|
12181
|
+
var host = _a2.host;
|
|
12182
|
+
var serializedData = toReq(payload);
|
|
12183
|
+
var metadata = {
|
|
12184
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12185
|
+
method: "GET",
|
|
12186
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.GetCodeProjectInfo",
|
|
12187
|
+
migrationOptions: {
|
|
12188
|
+
optInTransformResponse: true
|
|
12189
|
+
},
|
|
12190
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/code-project-info", data: serializedData, host }),
|
|
12191
|
+
params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
|
|
12192
|
+
transformResponse: fromRes
|
|
12193
|
+
};
|
|
12194
|
+
return metadata;
|
|
12195
|
+
}
|
|
12196
|
+
__getCodeProjectInfo.fromReq = fromReq;
|
|
12197
|
+
__getCodeProjectInfo.__isAmbassador = true;
|
|
12198
|
+
return __getCodeProjectInfo;
|
|
12199
|
+
}
|
|
12200
|
+
function startDevSession(payload) {
|
|
12201
|
+
var _a = (0, ambassador_1.serializer)(_startDevSessionRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12202
|
+
var fromRes = (0, ambassador_1.serializer)(_startDevSessionResponse, {}).fromJSON;
|
|
12203
|
+
function __startDevSession(_a2) {
|
|
12204
|
+
var host = _a2.host;
|
|
12205
|
+
var serializedData = toReq(payload);
|
|
12206
|
+
var metadata = {
|
|
12207
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12208
|
+
method: "POST",
|
|
12209
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.StartDevSession",
|
|
12210
|
+
migrationOptions: {
|
|
12211
|
+
optInTransformResponse: true
|
|
12212
|
+
},
|
|
12213
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/start-dev-session", data: serializedData, host }),
|
|
12214
|
+
data: serializedData,
|
|
12215
|
+
transformResponse: fromRes
|
|
12216
|
+
};
|
|
12217
|
+
return metadata;
|
|
12218
|
+
}
|
|
12219
|
+
__startDevSession.fromReq = fromReq;
|
|
12220
|
+
__startDevSession.__isAmbassador = true;
|
|
12221
|
+
return __startDevSession;
|
|
12222
|
+
}
|
|
12223
|
+
function startDevSessionTest(payload) {
|
|
12224
|
+
var _a = (0, ambassador_1.serializer)(_startDevSessionTestRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12225
|
+
var fromRes = (0, ambassador_1.serializer)(_startDevSessionTestResponse, {}).fromJSON;
|
|
12226
|
+
function __startDevSessionTest(_a2) {
|
|
12227
|
+
var host = _a2.host;
|
|
12228
|
+
var serializedData = toReq(payload);
|
|
12229
|
+
var metadata = {
|
|
12230
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12231
|
+
method: "POST",
|
|
12232
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.StartDevSessionTest",
|
|
12233
|
+
migrationOptions: {
|
|
12234
|
+
optInTransformResponse: true
|
|
12235
|
+
},
|
|
12236
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/start-dev-session-test", data: serializedData, host }),
|
|
12237
|
+
data: serializedData,
|
|
12238
|
+
transformResponse: fromRes
|
|
12239
|
+
};
|
|
12240
|
+
return metadata;
|
|
12241
|
+
}
|
|
12242
|
+
__startDevSessionTest.fromReq = fromReq;
|
|
12243
|
+
__startDevSessionTest.__isAmbassador = true;
|
|
12244
|
+
return __startDevSessionTest;
|
|
12245
|
+
}
|
|
12246
|
+
function getDevSessionStatus(payload) {
|
|
12247
|
+
var _a = (0, ambassador_1.serializer)(_getDevSessionStatusRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12248
|
+
var fromRes = (0, ambassador_1.serializer)(_getDevSessionStatusResponse, {
|
|
12249
|
+
_task,
|
|
12250
|
+
_taskInfo,
|
|
12251
|
+
_taskOptions
|
|
12252
|
+
}).fromJSON;
|
|
12253
|
+
function __getDevSessionStatus(_a2) {
|
|
12254
|
+
var host = _a2.host;
|
|
12255
|
+
var serializedData = toReq(payload);
|
|
12256
|
+
var metadata = {
|
|
12257
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12258
|
+
method: "GET",
|
|
12259
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.GetDevSessionStatus",
|
|
12260
|
+
migrationOptions: {
|
|
12261
|
+
optInTransformResponse: true
|
|
12262
|
+
},
|
|
12263
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/dev-session-status", data: serializedData, host }),
|
|
12264
|
+
params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
|
|
12265
|
+
transformResponse: fromRes
|
|
12266
|
+
};
|
|
12267
|
+
return metadata;
|
|
12268
|
+
}
|
|
12269
|
+
__getDevSessionStatus.fromReq = fromReq;
|
|
12270
|
+
__getDevSessionStatus.__isAmbassador = true;
|
|
12271
|
+
return __getDevSessionStatus;
|
|
12272
|
+
}
|
|
12273
|
+
function stopDevSession(payload) {
|
|
12274
|
+
var _a = (0, ambassador_1.serializer)(_stopDevSessionRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12275
|
+
var fromRes = (0, ambassador_1.serializer)(_stopDevSessionResponse, {}).fromJSON;
|
|
12276
|
+
function __stopDevSession(_a2) {
|
|
12277
|
+
var host = _a2.host;
|
|
12278
|
+
var serializedData = toReq(payload);
|
|
12279
|
+
var metadata = {
|
|
12280
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12281
|
+
method: "POST",
|
|
12282
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.StopDevSession",
|
|
12283
|
+
migrationOptions: {
|
|
12284
|
+
optInTransformResponse: true
|
|
12285
|
+
},
|
|
12286
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/stop-dev-session", data: serializedData, host }),
|
|
12287
|
+
data: serializedData,
|
|
12288
|
+
transformResponse: fromRes
|
|
12289
|
+
};
|
|
12290
|
+
return metadata;
|
|
12291
|
+
}
|
|
12292
|
+
__stopDevSession.fromReq = fromReq;
|
|
12293
|
+
__stopDevSession.__isAmbassador = true;
|
|
12294
|
+
return __stopDevSession;
|
|
12295
|
+
}
|
|
12296
|
+
function createCheckpoint(payload) {
|
|
12297
|
+
var _a = (0, ambassador_1.serializer)(_createCheckpointRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12298
|
+
var fromRes = (0, ambassador_1.serializer)(_createCheckpointResponse, {}).fromJSON;
|
|
12299
|
+
function __createCheckpoint(_a2) {
|
|
12300
|
+
var host = _a2.host;
|
|
12301
|
+
var serializedData = toReq(payload);
|
|
12302
|
+
var metadata = {
|
|
12303
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12304
|
+
method: "POST",
|
|
12305
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.CreateCheckpoint",
|
|
12306
|
+
migrationOptions: {
|
|
12307
|
+
optInTransformResponse: true
|
|
12308
|
+
},
|
|
12309
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/create-checkpoint", data: serializedData, host }),
|
|
12310
|
+
data: serializedData,
|
|
12311
|
+
transformResponse: fromRes
|
|
12312
|
+
};
|
|
12313
|
+
return metadata;
|
|
12314
|
+
}
|
|
12315
|
+
__createCheckpoint.fromReq = fromReq;
|
|
12316
|
+
__createCheckpoint.__isAmbassador = true;
|
|
12317
|
+
return __createCheckpoint;
|
|
12318
|
+
}
|
|
12319
|
+
function restoreRevision(payload) {
|
|
12320
|
+
var _a = (0, ambassador_1.serializer)(_restoreRevisionRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12321
|
+
var fromRes = (0, ambassador_1.serializer)(_restoreRevisionResponse, {}).fromJSON;
|
|
12322
|
+
function __restoreRevision(_a2) {
|
|
12323
|
+
var host = _a2.host;
|
|
12324
|
+
var serializedData = toReq(payload);
|
|
12325
|
+
var metadata = {
|
|
12326
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12327
|
+
method: "POST",
|
|
12328
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.RestoreRevision",
|
|
12329
|
+
migrationOptions: {
|
|
12330
|
+
optInTransformResponse: true
|
|
12331
|
+
},
|
|
12332
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/restore-revision", data: serializedData, host }),
|
|
12333
|
+
data: serializedData,
|
|
12334
|
+
transformResponse: fromRes
|
|
12335
|
+
};
|
|
12336
|
+
return metadata;
|
|
12337
|
+
}
|
|
12338
|
+
__restoreRevision.fromReq = fromReq;
|
|
12339
|
+
__restoreRevision.__isAmbassador = true;
|
|
12340
|
+
return __restoreRevision;
|
|
12341
|
+
}
|
|
12342
|
+
function createRevision(payload) {
|
|
12343
|
+
var _a = (0, ambassador_1.serializer)(_createRevisionRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12344
|
+
var fromRes = (0, ambassador_1.serializer)(_createRevisionResponse, {}).fromJSON;
|
|
12345
|
+
function __createRevision(_a2) {
|
|
12346
|
+
var host = _a2.host;
|
|
12347
|
+
var serializedData = toReq(payload);
|
|
12348
|
+
var metadata = {
|
|
12349
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12350
|
+
method: "POST",
|
|
12351
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.CreateRevision",
|
|
12352
|
+
migrationOptions: {
|
|
12353
|
+
optInTransformResponse: true
|
|
12354
|
+
},
|
|
12355
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/create-revision", data: serializedData, host }),
|
|
12356
|
+
data: serializedData,
|
|
12357
|
+
transformResponse: fromRes
|
|
12358
|
+
};
|
|
12359
|
+
return metadata;
|
|
12360
|
+
}
|
|
12361
|
+
__createRevision.fromReq = fromReq;
|
|
12362
|
+
__createRevision.__isAmbassador = true;
|
|
12363
|
+
return __createRevision;
|
|
12364
|
+
}
|
|
12365
|
+
function createCodeGenerationJob(payload) {
|
|
12366
|
+
var _a = (0, ambassador_1.serializer)(_createCodeGenerationJobRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12367
|
+
var fromRes = (0, ambassador_1.serializer)(_createCodeGenerationJobResponse, {}).fromJSON;
|
|
12368
|
+
function __createCodeGenerationJob(_a2) {
|
|
12369
|
+
var host = _a2.host;
|
|
12370
|
+
var serializedData = toReq(payload);
|
|
12371
|
+
var metadata = {
|
|
12372
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12373
|
+
method: "POST",
|
|
12374
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.CreateCodeGenerationJob",
|
|
12375
|
+
migrationOptions: {
|
|
12376
|
+
optInTransformResponse: true
|
|
12377
|
+
},
|
|
12378
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/create-code-generation", data: serializedData, host }),
|
|
12379
|
+
data: serializedData,
|
|
12380
|
+
transformResponse: fromRes
|
|
12381
|
+
};
|
|
12382
|
+
return metadata;
|
|
12383
|
+
}
|
|
12384
|
+
__createCodeGenerationJob.fromReq = fromReq;
|
|
12385
|
+
__createCodeGenerationJob.__isAmbassador = true;
|
|
12386
|
+
return __createCodeGenerationJob;
|
|
12387
|
+
}
|
|
12388
|
+
function commitDevOverride(payload) {
|
|
12389
|
+
var _a = (0, ambassador_1.serializer)(_commitDevOverrideRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12390
|
+
var fromRes = (0, ambassador_1.serializer)(_commitDevOverrideResponse, {}).fromJSON;
|
|
12391
|
+
function __commitDevOverride(_a2) {
|
|
12392
|
+
var host = _a2.host;
|
|
12393
|
+
var serializedData = toReq(payload);
|
|
12394
|
+
var metadata = {
|
|
12395
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12396
|
+
method: "POST",
|
|
12397
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.CommitDevOverride",
|
|
12398
|
+
migrationOptions: {
|
|
12399
|
+
optInTransformResponse: true
|
|
12400
|
+
},
|
|
12401
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/commit-dev-override", data: serializedData, host }),
|
|
12402
|
+
data: serializedData,
|
|
12403
|
+
transformResponse: fromRes
|
|
12404
|
+
};
|
|
12405
|
+
return metadata;
|
|
12406
|
+
}
|
|
12407
|
+
__commitDevOverride.fromReq = fromReq;
|
|
12408
|
+
__commitDevOverride.__isAmbassador = true;
|
|
12409
|
+
return __commitDevOverride;
|
|
12410
|
+
}
|
|
12411
|
+
function registerDevSchemas(payload) {
|
|
12412
|
+
var _a = (0, ambassador_1.serializer)(_registerDevSchemasRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12413
|
+
var fromRes = (0, ambassador_1.serializer)(_registerDevSchemasResponse, {}).fromJSON;
|
|
12414
|
+
function __registerDevSchemas(_a2) {
|
|
12415
|
+
var host = _a2.host;
|
|
12416
|
+
var serializedData = toReq(payload);
|
|
12417
|
+
var metadata = {
|
|
12418
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12419
|
+
method: "POST",
|
|
12420
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.RegisterDevSchemas",
|
|
12421
|
+
migrationOptions: {
|
|
12422
|
+
optInTransformResponse: true
|
|
12423
|
+
},
|
|
12424
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/register-dev-schemas", data: serializedData, host }),
|
|
12425
|
+
data: serializedData,
|
|
12426
|
+
transformResponse: fromRes
|
|
12427
|
+
};
|
|
12428
|
+
return metadata;
|
|
12429
|
+
}
|
|
12430
|
+
__registerDevSchemas.fromReq = fromReq;
|
|
12431
|
+
__registerDevSchemas.__isAmbassador = true;
|
|
12432
|
+
return __registerDevSchemas;
|
|
12433
|
+
}
|
|
12434
|
+
function generateDashboardPage(payload) {
|
|
12435
|
+
var _a = (0, ambassador_1.serializer)(_generateDashboardPageRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12436
|
+
var fromRes = (0, ambassador_1.serializer)(_generateDashboardPageResponse, {}).fromJSON;
|
|
12437
|
+
function __generateDashboardPage(_a2) {
|
|
12438
|
+
var host = _a2.host;
|
|
12439
|
+
var serializedData = toReq(payload);
|
|
12440
|
+
var metadata = {
|
|
12441
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12442
|
+
method: "POST",
|
|
12443
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.GenerateDashboardPage",
|
|
12444
|
+
migrationOptions: {
|
|
12445
|
+
optInTransformResponse: true
|
|
12446
|
+
},
|
|
12447
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/generate-dashboard-page", data: serializedData, host }),
|
|
12448
|
+
data: serializedData,
|
|
12449
|
+
transformResponse: fromRes
|
|
12450
|
+
};
|
|
12451
|
+
return metadata;
|
|
12452
|
+
}
|
|
12453
|
+
__generateDashboardPage.fromReq = fromReq;
|
|
12454
|
+
__generateDashboardPage.__isAmbassador = true;
|
|
12455
|
+
return __generateDashboardPage;
|
|
12456
|
+
}
|
|
12457
|
+
function getCodeGenerationJobStatus(payload) {
|
|
12458
|
+
var _a = (0, ambassador_1.serializer)(_getCodeGenerationJobStatusRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
|
|
12459
|
+
var fromRes = (0, ambassador_1.serializer)(_getCodeGenerationJobStatusResponse, {}).fromJSON;
|
|
12460
|
+
function __getCodeGenerationJobStatus(_a2) {
|
|
12461
|
+
var host = _a2.host;
|
|
12462
|
+
var serializedData = toReq(payload);
|
|
12463
|
+
var metadata = {
|
|
12464
|
+
entityFqdn: "wix.code_project.orchestrator.v1.code_project",
|
|
12465
|
+
method: "GET",
|
|
12466
|
+
methodFqn: "com.wixpress.code_project.orchestrator.api.CodeProjectOrchestratorService.GetCodeGenerationJobStatus",
|
|
12467
|
+
migrationOptions: {
|
|
12468
|
+
optInTransformResponse: true
|
|
12469
|
+
},
|
|
12470
|
+
url: resolveComWixpressCodeProjectOrchestratorApiCodeProjectOrchestratorServiceUrl({ protoPath: "/v1/job-status", data: serializedData, host }),
|
|
12471
|
+
params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
|
|
12472
|
+
transformResponse: fromRes
|
|
12473
|
+
};
|
|
12474
|
+
return metadata;
|
|
12475
|
+
}
|
|
12476
|
+
__getCodeGenerationJobStatus.fromReq = fromReq;
|
|
12477
|
+
__getCodeGenerationJobStatus.__isAmbassador = true;
|
|
12478
|
+
return __getCodeGenerationJobStatus;
|
|
12479
|
+
}
|
|
12480
|
+
}
|
|
12481
|
+
});
|
|
12482
|
+
|
|
12031
12483
|
// ../codegen-checkpoint-plugin/dist/checkpoint.js
|
|
12032
12484
|
var require_checkpoint = __commonJS({
|
|
12033
12485
|
"../codegen-checkpoint-plugin/dist/checkpoint.js"(exports2) {
|
|
@@ -12037,6 +12489,7 @@ var require_checkpoint = __commonJS({
|
|
|
12037
12489
|
var fs_1 = require("fs");
|
|
12038
12490
|
var path_1 = require("path");
|
|
12039
12491
|
var http_1 = require_http_impl2();
|
|
12492
|
+
var http_2 = require_http_impl3();
|
|
12040
12493
|
var http_client_1 = require_index_node();
|
|
12041
12494
|
var FALLBACK_COMMIT_MESSAGE = "Auto-save";
|
|
12042
12495
|
var EML_MARKER = "generate-eml.ts";
|
|
@@ -12062,9 +12515,17 @@ var require_checkpoint = __commonJS({
|
|
|
12062
12515
|
return message;
|
|
12063
12516
|
return message.slice(0, MAX_COMMIT_MESSAGE_LENGTH - TRUNCATION_SUFFIX.length) + TRUNCATION_SUFFIX;
|
|
12064
12517
|
};
|
|
12065
|
-
var
|
|
12518
|
+
var useCodeProjectOrchestrator = () => process.env.USE_CODE_PROJECT_ORCHESTRATOR === "true";
|
|
12519
|
+
var callCreateCheckpoint = async (client, job, commitMessage) => {
|
|
12520
|
+
if (useCodeProjectOrchestrator()) {
|
|
12521
|
+
if (!job.siteBranchId) {
|
|
12522
|
+
throw new Error("[Checkpoint] SITE_BRANCH_ID is required for the code-project-orchestrator checkpoint");
|
|
12523
|
+
}
|
|
12524
|
+
const resp2 = await client.request((0, http_2.createCheckpoint)({ siteBranchId: job.siteBranchId }));
|
|
12525
|
+
return { checkpointId: resp2.data?.revision?.revisionId };
|
|
12526
|
+
}
|
|
12066
12527
|
const resp = await client.request((0, http_1.createCheckpoint)({
|
|
12067
|
-
appId,
|
|
12528
|
+
appId: job.projectId,
|
|
12068
12529
|
commitMessage: truncateCommitMessage(commitMessage)
|
|
12069
12530
|
}));
|
|
12070
12531
|
return { checkpointId: resp.data?.checkpointId };
|
|
@@ -12096,7 +12557,7 @@ var require_checkpoint = __commonJS({
|
|
|
12096
12557
|
if (!job)
|
|
12097
12558
|
return;
|
|
12098
12559
|
try {
|
|
12099
|
-
const { checkpointId } = await callCreateCheckpoint(orchestratorHttpClient, job
|
|
12560
|
+
const { checkpointId } = await callCreateCheckpoint(orchestratorHttpClient, job, commitMessage);
|
|
12100
12561
|
outcome = { status: "created", checkpointId };
|
|
12101
12562
|
if (checkpointId) {
|
|
12102
12563
|
await host.jobs.updatePayload({ jobId: job.jobId, taskId: job.taskId }, { checkpointId });
|
|
@@ -13476,9 +13937,13 @@ TOOL USAGE:
|
|
|
13476
13937
|
- For tools where no batch variant exists (e.g. \`grep\`, \`glob\`), still emit MULTIPLE \`tool_use\` blocks in a SINGLE response when the calls are independent. Sequential turns waste a model round-trip per call.
|
|
13477
13938
|
- Before calling MCP tools, check if loaded skills already cover the API. Only use MCP for gaps.
|
|
13478
13939
|
- When using MCP to look up a Wix SDK method, ALWAYS call \`ReadFullDocsMethodSchema\` (not just \`ReadFullDocsArticle\`). The schema is the source of truth for parameter shapes. Code examples in docs may use incorrect call signatures.
|
|
13479
|
-
- To discover API shapes, method signatures, or type definitions: ALWAYS try \`SearchWixSDKDocumentation\` or \`ReadFullDocsMethodSchema\` via wix-mcp first. ONLY fall back to grepping \`node_modules\` if the MCP tools return no useful results. Grepping \`node_modules\` as a first resort wastes turns, inflates context, and produces unreliable results \u2014 SDK internals are not a documentation source.
|
|
13940
|
+
- To discover API shapes, method signatures, or type definitions: ALWAYS try \`SearchWixSDKDocumentation\` or \`ReadFullDocsMethodSchema\` via wix-mcp first. ONLY fall back to grepping \`node_modules\` if the MCP tools return no useful results. Grepping \`node_modules\` as a first resort wastes turns, inflates context, and produces unreliable results \u2014 SDK internals are not a documentation source. ENFORCED: after 2 such lookups, further bash inspection of \`node_modules\` Wix/vite/astro internals is rejected.
|
|
13480
13941
|
- NEVER run preview, dev, release, or promote commands.
|
|
13481
13942
|
|
|
13943
|
+
KNOWN WIX APIS (already documented \u2014 do NOT rediscover these from node_modules; for full detail consult the \`wix-app\` skill's references or \`ReadFullDocsMethodSchema\`):
|
|
13944
|
+
- Wix Data items CRUD: \`import { items } from "@wix/data"\` \u2014 \`items.query(collectionId)\`, \`items.get\`, \`items.insert\`, \`items.update\` (replaces the WHOLE item \u2014 send all fields), \`items.remove\`.
|
|
13945
|
+
- Dashboard host SDK (toasts, navigation, modals): \`import { dashboard } from "@wix/dashboard"\`.
|
|
13946
|
+
|
|
13482
13947
|
IMPLEMENTATION WORKFLOW:
|
|
13483
13948
|
1. **Plan**: Determine extension types using the \`wix-app\` skill. Generate ALL UUIDs upfront. Include a \`progress\` call (e.g. "Planning extensions").
|
|
13484
13949
|
2. **Research**: Load relevant SDK docs and skills for each extension type. Include a \`progress\` call (e.g. "Reading documentation").
|
|
@@ -13730,6 +14195,7 @@ var require_config = __commonJS({
|
|
|
13730
14195
|
var constants_1 = require_constants5();
|
|
13731
14196
|
var experiments_1 = require_experiments();
|
|
13732
14197
|
var rules_writer_12 = require_rules_writer();
|
|
14198
|
+
var node_modules_guard_12 = require_node_modules_guard();
|
|
13733
14199
|
var environments_12 = require_environments();
|
|
13734
14200
|
exports2.DEFAULT_TIMEOUT_MS = 20 * 60 * 1e3;
|
|
13735
14201
|
exports2.DEFAULT_MODEL = "anthropic/claude-sonnet-4-6";
|
|
@@ -13806,6 +14272,9 @@ var require_config = __commonJS({
|
|
|
13806
14272
|
}
|
|
13807
14273
|
},
|
|
13808
14274
|
instructions: instructionPaths,
|
|
14275
|
+
// Blocks node_modules SDK-spelunking bash turns after a small exploratory
|
|
14276
|
+
// budget and steers back to the loaded references (see node-modules-guard.ts).
|
|
14277
|
+
plugin: [node_modules_guard_12.GUARD_PLUGIN_PATH],
|
|
13809
14278
|
autoupdate: false,
|
|
13810
14279
|
share: "disabled",
|
|
13811
14280
|
lsp: false,
|
|
@@ -20996,6 +21465,7 @@ var logger_1 = require_logger();
|
|
|
20996
21465
|
var skills_installer_1 = require_skills_installer();
|
|
20997
21466
|
var rules_writer_1 = require_rules_writer();
|
|
20998
21467
|
var tools_writer_1 = require_tools_writer();
|
|
21468
|
+
var node_modules_guard_1 = require_node_modules_guard();
|
|
20999
21469
|
var plugin_artifacts_1 = require_plugin_artifacts();
|
|
21000
21470
|
var config_1 = require_config();
|
|
21001
21471
|
var environments_1 = require_environments();
|
|
@@ -21054,7 +21524,8 @@ async function initOpenCode() {
|
|
|
21054
21524
|
(0, rules_writer_1.writeRuleFiles)([...envConfig.codegenRules, ...pluginArtifacts.rules]),
|
|
21055
21525
|
(0, rules_writer_1.writeRuleFiles)(envConfig.askRules),
|
|
21056
21526
|
(0, skills_installer_1.applySkillsOverride)((0, codegen_flow_helpers_1.getOutputPath)(), logger_1.logger),
|
|
21057
|
-
(0, tools_writer_1.writeToolFiles)(pluginArtifacts.tools)
|
|
21527
|
+
(0, tools_writer_1.writeToolFiles)(pluginArtifacts.tools),
|
|
21528
|
+
(0, node_modules_guard_1.writeGuardPlugin)()
|
|
21058
21529
|
]);
|
|
21059
21530
|
}
|
|
21060
21531
|
async function main(ctx) {
|
|
@@ -21080,6 +21551,7 @@ function buildPluginsForTask(jobId, taskId, kind, payload) {
|
|
|
21080
21551
|
host,
|
|
21081
21552
|
job: {
|
|
21082
21553
|
projectId: context_1.ctx.projectId,
|
|
21554
|
+
siteBranchId: context_1.ctx.siteBranchId,
|
|
21083
21555
|
jobId,
|
|
21084
21556
|
taskId,
|
|
21085
21557
|
kind,
|
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.369",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"esbuild": "^0.27.2",
|
|
30
30
|
"vitest": "^4.0.16"
|
|
31
31
|
},
|
|
32
|
-
"falconPackageHash": "
|
|
32
|
+
"falconPackageHash": "810043ba6ca91bc61664315a3d3610a710ec1927b24ce3853298f80c"
|
|
33
33
|
}
|