@wix/ditto-codegen-public 1.0.230 → 1.0.232

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.
Files changed (2) hide show
  1. package/dist/out.js +179 -83
  2. package/package.json +2 -2
package/dist/out.js CHANGED
@@ -57,6 +57,7 @@ var require_types_impl = __commonJS({
57
57
  Status2["FAILED"] = "FAILED";
58
58
  Status2["CANCELLED"] = "CANCELLED";
59
59
  Status2["PENDING_CANCEL"] = "PENDING_CANCEL";
60
+ Status2["AWAITING_USER_INPUT"] = "AWAITING_USER_INPUT";
60
61
  })(Status || (exports2.Status = Status = {}));
61
62
  }
62
63
  });
@@ -2568,15 +2569,16 @@ var require_browser = __commonJS({
2568
2569
  }
2569
2570
  });
2570
2571
 
2571
- // ../../node_modules/has-flag/index.js
2572
+ // ../../node_modules/supports-color/node_modules/has-flag/index.js
2572
2573
  var require_has_flag = __commonJS({
2573
- "../../node_modules/has-flag/index.js"(exports2, module2) {
2574
+ "../../node_modules/supports-color/node_modules/has-flag/index.js"(exports2, module2) {
2574
2575
  "use strict";
2575
- module2.exports = (flag, argv = process.argv) => {
2576
+ module2.exports = (flag, argv) => {
2577
+ argv = argv || process.argv;
2576
2578
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
2577
- const position = argv.indexOf(prefix + flag);
2578
- const terminatorPosition = argv.indexOf("--");
2579
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
2579
+ const pos = argv.indexOf(prefix + flag);
2580
+ const terminatorPos = argv.indexOf("--");
2581
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
2580
2582
  };
2581
2583
  }
2582
2584
  });
@@ -2586,23 +2588,16 @@ var require_supports_color = __commonJS({
2586
2588
  "../../node_modules/supports-color/index.js"(exports2, module2) {
2587
2589
  "use strict";
2588
2590
  var os = require("os");
2589
- var tty = require("tty");
2590
2591
  var hasFlag = require_has_flag();
2591
- var { env } = process;
2592
+ var env = process.env;
2592
2593
  var forceColor;
2593
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
2594
- forceColor = 0;
2594
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
2595
+ forceColor = false;
2595
2596
  } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
2596
- forceColor = 1;
2597
+ forceColor = true;
2597
2598
  }
2598
2599
  if ("FORCE_COLOR" in env) {
2599
- if (env.FORCE_COLOR === "true") {
2600
- forceColor = 1;
2601
- } else if (env.FORCE_COLOR === "false") {
2602
- forceColor = 0;
2603
- } else {
2604
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
2605
- }
2600
+ forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
2606
2601
  }
2607
2602
  function translateLevel(level) {
2608
2603
  if (level === 0) {
@@ -2615,8 +2610,8 @@ var require_supports_color = __commonJS({
2615
2610
  has16m: level >= 3
2616
2611
  };
2617
2612
  }
2618
- function supportsColor(haveStream, streamIsTTY) {
2619
- if (forceColor === 0) {
2613
+ function supportsColor(stream) {
2614
+ if (forceColor === false) {
2620
2615
  return 0;
2621
2616
  }
2622
2617
  if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
@@ -2625,22 +2620,19 @@ var require_supports_color = __commonJS({
2625
2620
  if (hasFlag("color=256")) {
2626
2621
  return 2;
2627
2622
  }
2628
- if (haveStream && !streamIsTTY && forceColor === void 0) {
2623
+ if (stream && !stream.isTTY && forceColor !== true) {
2629
2624
  return 0;
2630
2625
  }
2631
- const min = forceColor || 0;
2632
- if (env.TERM === "dumb") {
2633
- return min;
2634
- }
2626
+ const min = forceColor ? 1 : 0;
2635
2627
  if (process.platform === "win32") {
2636
2628
  const osRelease = os.release().split(".");
2637
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
2629
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
2638
2630
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
2639
2631
  }
2640
2632
  return 1;
2641
2633
  }
2642
2634
  if ("CI" in env) {
2643
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
2635
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
2644
2636
  return 1;
2645
2637
  }
2646
2638
  return min;
@@ -2669,16 +2661,19 @@ var require_supports_color = __commonJS({
2669
2661
  if ("COLORTERM" in env) {
2670
2662
  return 1;
2671
2663
  }
2664
+ if (env.TERM === "dumb") {
2665
+ return min;
2666
+ }
2672
2667
  return min;
2673
2668
  }
2674
2669
  function getSupportLevel(stream) {
2675
- const level = supportsColor(stream, stream && stream.isTTY);
2670
+ const level = supportsColor(stream);
2676
2671
  return translateLevel(level);
2677
2672
  }
2678
2673
  module2.exports = {
2679
2674
  supportsColor: getSupportLevel,
2680
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
2681
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
2675
+ stdout: getSupportLevel(process.stdout),
2676
+ stderr: getSupportLevel(process.stderr)
2682
2677
  };
2683
2678
  }
2684
2679
  });
@@ -6497,6 +6492,7 @@ var require_http_impl = __commonJS({
6497
6492
  exports2.createTask = createTask;
6498
6493
  exports2.updateTask = updateTask;
6499
6494
  exports2.stopGeneration = stopGeneration;
6495
+ exports2.submitUserDecision = submitUserDecision;
6500
6496
  var metro_runtime_1 = require_cjs2();
6501
6497
  var ambassador_1 = require_ambassador_index();
6502
6498
  var metro_runtime_2 = require_cjs2();
@@ -6509,7 +6505,9 @@ var require_http_impl = __commonJS({
6509
6505
  var _job = {
6510
6506
  createdAt: "google.protobuf.Timestamp",
6511
6507
  updatedAt: "google.protobuf.Timestamp",
6512
- tasks: "_task"
6508
+ tasks: "_task",
6509
+ pendingUserDecisions: "_userDecision",
6510
+ userDecisionHistory: "_userDecision"
6513
6511
  };
6514
6512
  var _listProjectJobsRequest = {};
6515
6513
  var _listProjectJobsResponse = { jobs: "_job" };
@@ -6521,6 +6519,8 @@ var require_http_impl = __commonJS({
6521
6519
  };
6522
6520
  var _stopGenerationRequest = {};
6523
6521
  var _stopGenerationResponse = { job: "_job" };
6522
+ var _submitUserDecisionRequest = {};
6523
+ var _submitUserDecisionResponse = { job: "_job" };
6524
6524
  var _task = {
6525
6525
  createdAt: "google.protobuf.Timestamp",
6526
6526
  updatedAt: "google.protobuf.Timestamp"
@@ -6535,6 +6535,12 @@ var require_http_impl = __commonJS({
6535
6535
  task: "_task"
6536
6536
  };
6537
6537
  var _updateTaskResponse = { task: "_task" };
6538
+ var _userDecision = {
6539
+ request: "_userDecisionRequest",
6540
+ response: "_userDecisionResponse"
6541
+ };
6542
+ var _userDecisionRequest = { requestedAt: "google.protobuf.Timestamp" };
6543
+ var _userDecisionResponse = { respondedAt: "google.protobuf.Timestamp" };
6538
6544
  function resolveComWixpressDittoCodegenJobServiceApiCodegenJobServiceUrl(opts) {
6539
6545
  var domainToMappings = {
6540
6546
  _base_domain_: [
@@ -6601,7 +6607,10 @@ var require_http_impl = __commonJS({
6601
6607
  var _a2 = (0, ambassador_1.serializer)(_listProjectJobsRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
6602
6608
  var fromRes = (0, ambassador_1.serializer)(_listProjectJobsResponse, {
6603
6609
  _job,
6604
- _task
6610
+ _task,
6611
+ _userDecision,
6612
+ _userDecisionRequest,
6613
+ _userDecisionResponse
6605
6614
  }).fromJSON;
6606
6615
  function __listProjectJobs(_a3) {
6607
6616
  var host = _a3.host;
@@ -6629,7 +6638,13 @@ var require_http_impl = __commonJS({
6629
6638
  }
6630
6639
  function getJob(payload) {
6631
6640
  var _a2 = (0, ambassador_1.serializer)(_getJobRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
6632
- var fromRes = (0, ambassador_1.serializer)(_getJobResponse, { _job, _task }).fromJSON;
6641
+ var fromRes = (0, ambassador_1.serializer)(_getJobResponse, {
6642
+ _job,
6643
+ _task,
6644
+ _userDecision,
6645
+ _userDecisionRequest,
6646
+ _userDecisionResponse
6647
+ }).fromJSON;
6633
6648
  function __getJob(_a3) {
6634
6649
  var host = _a3.host;
6635
6650
  var serializedData = toReq(payload);
@@ -6657,9 +6672,18 @@ var require_http_impl = __commonJS({
6657
6672
  function createJob(payload) {
6658
6673
  var _a2 = (0, ambassador_1.serializer)(_createJobRequest, {
6659
6674
  _job,
6660
- _task
6675
+ _task,
6676
+ _userDecision,
6677
+ _userDecisionRequest,
6678
+ _userDecisionResponse
6661
6679
  }), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
6662
- var fromRes = (0, ambassador_1.serializer)(_createJobResponse, { _job, _task }).fromJSON;
6680
+ var fromRes = (0, ambassador_1.serializer)(_createJobResponse, {
6681
+ _job,
6682
+ _task,
6683
+ _userDecision,
6684
+ _userDecisionRequest,
6685
+ _userDecisionResponse
6686
+ }).fromJSON;
6663
6687
  function __createJob(_a3) {
6664
6688
  var host = _a3.host;
6665
6689
  var serializedData = toReq(payload);
@@ -6687,9 +6711,18 @@ var require_http_impl = __commonJS({
6687
6711
  function updateJob(payload) {
6688
6712
  var _a2 = (0, ambassador_1.serializer)(_updateJobRequest, {
6689
6713
  _job,
6690
- _task
6714
+ _task,
6715
+ _userDecision,
6716
+ _userDecisionRequest,
6717
+ _userDecisionResponse
6691
6718
  }), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
6692
- var fromRes = (0, ambassador_1.serializer)(_updateJobResponse, { _job, _task }).fromJSON;
6719
+ var fromRes = (0, ambassador_1.serializer)(_updateJobResponse, {
6720
+ _job,
6721
+ _task,
6722
+ _userDecision,
6723
+ _userDecisionRequest,
6724
+ _userDecisionResponse
6725
+ }).fromJSON;
6693
6726
  function __updateJob(_a3) {
6694
6727
  var host = _a3.host;
6695
6728
  var serializedData = toReq(payload);
@@ -6720,7 +6753,10 @@ var require_http_impl = __commonJS({
6720
6753
  }), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
6721
6754
  var fromRes = (0, ambassador_1.serializer)(_createTaskResponse, {
6722
6755
  _job,
6723
- _task
6756
+ _task,
6757
+ _userDecision,
6758
+ _userDecisionRequest,
6759
+ _userDecisionResponse
6724
6760
  }).fromJSON;
6725
6761
  function __createTask(_a3) {
6726
6762
  var host = _a3.host;
@@ -6779,7 +6815,10 @@ var require_http_impl = __commonJS({
6779
6815
  var _a2 = (0, ambassador_1.serializer)(_stopGenerationRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
6780
6816
  var fromRes = (0, ambassador_1.serializer)(_stopGenerationResponse, {
6781
6817
  _job,
6782
- _task
6818
+ _task,
6819
+ _userDecision,
6820
+ _userDecisionRequest,
6821
+ _userDecisionResponse
6783
6822
  }).fromJSON;
6784
6823
  function __stopGeneration(_a3) {
6785
6824
  var host = _a3.host;
@@ -6805,6 +6844,39 @@ var require_http_impl = __commonJS({
6805
6844
  __stopGeneration.__isAmbassador = true;
6806
6845
  return __stopGeneration;
6807
6846
  }
6847
+ function submitUserDecision(payload) {
6848
+ var _a2 = (0, ambassador_1.serializer)(_submitUserDecisionRequest, {}), toReq = _a2.toJSON, fromReq = _a2.fromJSON;
6849
+ var fromRes = (0, ambassador_1.serializer)(_submitUserDecisionResponse, {
6850
+ _job,
6851
+ _task,
6852
+ _userDecision,
6853
+ _userDecisionRequest,
6854
+ _userDecisionResponse
6855
+ }).fromJSON;
6856
+ function __submitUserDecision(_a3) {
6857
+ var host = _a3.host;
6858
+ var serializedData = toReq(payload);
6859
+ var metadata = {
6860
+ entityFqdn: "wix.ctp.codegen_job_service.v1.job",
6861
+ method: "POST",
6862
+ methodFqn: "com.wixpress.ditto.codegen_job_service.api.CodegenJobService.SubmitUserDecision",
6863
+ migrationOptions: {
6864
+ optInTransformResponse: true
6865
+ },
6866
+ url: resolveComWixpressDittoCodegenJobServiceApiCodegenJobServiceUrl({
6867
+ protoPath: "/v1/projects/{projectId}/jobs/{jobId}/user-decisions/{decisionId}",
6868
+ data: serializedData,
6869
+ host
6870
+ }),
6871
+ data: serializedData,
6872
+ transformResponse: fromRes
6873
+ };
6874
+ return metadata;
6875
+ }
6876
+ __submitUserDecision.fromReq = fromReq;
6877
+ __submitUserDecision.__isAmbassador = true;
6878
+ return __submitUserDecision;
6879
+ }
6808
6880
  }
6809
6881
  });
6810
6882
 
@@ -6921,8 +6993,9 @@ var require_CodeGenService = __commonJS({
6921
6993
  }));
6922
6994
  return resp.data?.job ?? null;
6923
6995
  };
6996
+ const serverUrl = process.env.CODEGEN_SERVER_BASE_URL || "https://manage.wix.com";
6924
6997
  this.httpClient = (0, http_client_1.createHttpClient)({
6925
- baseURL: "https://manage.wix.com",
6998
+ baseURL: serverUrl,
6926
6999
  headers: {
6927
7000
  authorization: `Bearer ${this.accessToken}`
6928
7001
  }
@@ -7687,13 +7760,40 @@ var require_errors2 = __commonJS({
7687
7760
  }
7688
7761
  });
7689
7762
 
7763
+ // ../codegen-types/node_modules/@wix/ambassador-ctp-codegen-job-service-v1-job/build/cjs/types.impl.js
7764
+ var require_types_impl2 = __commonJS({
7765
+ "../codegen-types/node_modules/@wix/ambassador-ctp-codegen-job-service-v1-job/build/cjs/types.impl.js"(exports2) {
7766
+ "use strict";
7767
+ Object.defineProperty(exports2, "__esModule", { value: true });
7768
+ exports2.Status = exports2.TaskKind = void 0;
7769
+ var TaskKind;
7770
+ (function(TaskKind2) {
7771
+ TaskKind2["UNKNOWN_TASK_KIND"] = "UNKNOWN_TASK_KIND";
7772
+ TaskKind2["INIT_CODEGEN"] = "INIT_CODEGEN";
7773
+ TaskKind2["ITERATE_CODEGEN"] = "ITERATE_CODEGEN";
7774
+ TaskKind2["RUN_AGENT"] = "RUN_AGENT";
7775
+ TaskKind2["FIX_CODE"] = "FIX_CODE";
7776
+ })(TaskKind || (exports2.TaskKind = TaskKind = {}));
7777
+ var Status;
7778
+ (function(Status2) {
7779
+ Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
7780
+ Status2["PENDING"] = "PENDING";
7781
+ Status2["RUNNING"] = "RUNNING";
7782
+ Status2["COMPLETED"] = "COMPLETED";
7783
+ Status2["FAILED"] = "FAILED";
7784
+ Status2["CANCELLED"] = "CANCELLED";
7785
+ Status2["PENDING_CANCEL"] = "PENDING_CANCEL";
7786
+ })(Status || (exports2.Status = Status = {}));
7787
+ }
7788
+ });
7789
+
7690
7790
  // ../codegen-types/dist/types/status.js
7691
7791
  var require_status = __commonJS({
7692
7792
  "../codegen-types/dist/types/status.js"(exports2) {
7693
7793
  "use strict";
7694
7794
  Object.defineProperty(exports2, "__esModule", { value: true });
7695
7795
  exports2.Status = void 0;
7696
- var types_1 = require_types_impl();
7796
+ var types_1 = require_types_impl2();
7697
7797
  Object.defineProperty(exports2, "Status", { enumerable: true, get: function() {
7698
7798
  return types_1.Status;
7699
7799
  } });
@@ -7706,7 +7806,7 @@ var require_task = __commonJS({
7706
7806
  "use strict";
7707
7807
  Object.defineProperty(exports2, "__esModule", { value: true });
7708
7808
  exports2.TaskKind = void 0;
7709
- var types_1 = require_types_impl();
7809
+ var types_1 = require_types_impl2();
7710
7810
  Object.defineProperty(exports2, "TaskKind", { enumerable: true, get: function() {
7711
7811
  return types_1.TaskKind;
7712
7812
  } });
@@ -44374,7 +44474,7 @@ var require_codeGenerationService = __commonJS({
44374
44474
  });
44375
44475
 
44376
44476
  // ../../node_modules/@wix/ambassador-ctp-ditto-v1-blueprint/build/cjs/types.impl.js
44377
- var require_types_impl2 = __commonJS({
44477
+ var require_types_impl3 = __commonJS({
44378
44478
  "../../node_modules/@wix/ambassador-ctp-ditto-v1-blueprint/build/cjs/types.impl.js"(exports2) {
44379
44479
  "use strict";
44380
44480
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -44403,7 +44503,7 @@ var require_extensions = __commonJS({
44403
44503
  "use strict";
44404
44504
  Object.defineProperty(exports2, "__esModule", { value: true });
44405
44505
  exports2.codeGenerationExtensionTypes = void 0;
44406
- var types_1 = require_types_impl2();
44506
+ var types_1 = require_types_impl3();
44407
44507
  exports2.codeGenerationExtensionTypes = [
44408
44508
  types_1.ExtensionType.SERVICE_PLUGIN,
44409
44509
  types_1.ExtensionType.DASHBOARD_PAGE,
@@ -45823,7 +45923,7 @@ var require_extension_type_documentation = __commonJS({
45823
45923
  "use strict";
45824
45924
  Object.defineProperty(exports2, "__esModule", { value: true });
45825
45925
  exports2.getExtensionTypeDocumentation = getExtensionTypeDocumentation;
45826
- var types_1 = require_types_impl2();
45926
+ var types_1 = require_types_impl3();
45827
45927
  var DashboardPageAgent_1 = require_DashboardPageAgent();
45828
45928
  var SiteComponentAgent_1 = require_SiteComponentAgent();
45829
45929
  var CustomElementAgent_1 = require_CustomElementAgent();
@@ -46147,7 +46247,7 @@ async function updateTodo(id: string, todo: Partial<Todo>): Promise<Todo> {
46147
46247
  });
46148
46248
 
46149
46249
  // ../../node_modules/@wix/ambassador-data-v2-data-collection/build/cjs/types.impl.js
46150
- var require_types_impl3 = __commonJS({
46250
+ var require_types_impl4 = __commonJS({
46151
46251
  "../../node_modules/@wix/ambassador-data-v2-data-collection/build/cjs/types.impl.js"(exports2) {
46152
46252
  "use strict";
46153
46253
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -46360,7 +46460,7 @@ var require_cms_planner_instructions = __commonJS({
46360
46460
  "use strict";
46361
46461
  Object.defineProperty(exports2, "__esModule", { value: true });
46362
46462
  exports2.cmsPlannerInstructions = void 0;
46363
- var types_1 = require_types_impl3();
46463
+ var types_1 = require_types_impl4();
46364
46464
  var ditto_codegen_types_12 = require_dist4();
46365
46465
  var handlingFeesExample = {
46366
46466
  operation: ditto_codegen_types_12.ExtensionGenerationOperation.INSERT,
@@ -46980,9 +47080,9 @@ var require_EmbeddedScriptSchema = __commonJS({
46980
47080
  extensionId: zod_1.z.string().describe("The extension ID of the embedded script"),
46981
47081
  keys: zod_1.z.array(zod_1.z.string()).min(1).describe("Array of parameter keys to delete")
46982
47082
  }).describe("Delete one or more embedded script parameters by providing extensionId and array of keys");
46983
- exports2.EmbeddedScriptParametersOperationSchema = zod_1.z.discriminatedUnion("operation", [
47083
+ exports2.EmbeddedScriptParametersOperationSchema = zod_1.z.union([
46984
47084
  zod_1.z.object({
46985
- operation: zod_1.z.literal(ditto_codegen_types_12.ExtensionGenerationOperation.INSERT),
47085
+ operation: zod_1.z.literal(ditto_codegen_types_12.ExtensionGenerationOperation.INSERT).default(ditto_codegen_types_12.ExtensionGenerationOperation.INSERT),
46986
47086
  data: EmbeddedScriptParametersSchema.describe("Complete embedded script parameters data for insertion (all parameters for the extension)")
46987
47087
  }),
46988
47088
  zod_1.z.object({
@@ -47338,9 +47438,9 @@ var require_PlannerAgentSchema = __commonJS({
47338
47438
  var DeleteCollectionDataSchema = zod_1.default.object({
47339
47439
  idSuffix: zod_1.default.string().describe("The ID suffix of the collection to delete")
47340
47440
  });
47341
- var CollectionOperationSchema = zod_1.default.discriminatedUnion("operation", [
47441
+ var CollectionOperationSchema = zod_1.default.union([
47342
47442
  zod_1.default.object({
47343
- operation: zod_1.default.literal(ditto_codegen_types_12.ExtensionGenerationOperation.INSERT),
47443
+ operation: zod_1.default.literal(ditto_codegen_types_12.ExtensionGenerationOperation.INSERT).default(ditto_codegen_types_12.ExtensionGenerationOperation.INSERT),
47344
47444
  data: CollectionSchema.describe("Complete collection data for insertion")
47345
47445
  }),
47346
47446
  zod_1.default.object({
@@ -47446,7 +47546,7 @@ var require_PlannerAgent = __commonJS({
47446
47546
  "use strict";
47447
47547
  Object.defineProperty(exports2, "__esModule", { value: true });
47448
47548
  exports2.PlannerAgent = void 0;
47449
- var types_1 = require_types_impl2();
47549
+ var types_1 = require_types_impl3();
47450
47550
  var planner_prompt_1 = require_planner_prompt();
47451
47551
  var ditto_codegen_types_12 = require_dist4();
47452
47552
  var PlannerAgentSchema_1 = require_PlannerAgentSchema();
@@ -76041,7 +76141,7 @@ var require_load_examples = __commonJS({
76041
76141
  exports2.loadExamples = void 0;
76042
76142
  var fs_1 = __importDefault2(require("fs"));
76043
76143
  var path_1 = __importDefault2(require("path"));
76044
- var types_1 = require_types_impl2();
76144
+ var types_1 = require_types_impl3();
76045
76145
  var appsExamples = {
76046
76146
  AIChatbot: {
76047
76147
  path: "ai-chatbot",
@@ -76374,7 +76474,7 @@ var require_dashboard_page_prompt = __commonJS({
76374
76474
  "use strict";
76375
76475
  Object.defineProperty(exports2, "__esModule", { value: true });
76376
76476
  exports2.dashboardPagePrompt = exports2.dashboardPageCorePrompt = void 0;
76377
- var types_1 = require_types_impl2();
76477
+ var types_1 = require_types_impl3();
76378
76478
  var dashboard_page_instructions_1 = require_dashboard_page_instructions();
76379
76479
  var CodeGenerationSystemPromptBuilder_1 = require_CodeGenerationSystemPromptBuilder();
76380
76480
  var createCoreBuilder = ({ useData, useIteration, apiDocumentation, useApiSpec, useDynamicParameters }) => {
@@ -76428,7 +76528,7 @@ var require_prompt_selectors = __commonJS({
76428
76528
  exports2.hasUnsupportedCollectionFieldsTypes = hasUnsupportedCollectionFieldsTypes;
76429
76529
  exports2.hasUnsupportedCollectionTypes = hasUnsupportedCollectionTypes;
76430
76530
  exports2.shouldUseDynamicParametersPrompt = shouldUseDynamicParametersPrompt;
76431
- var types_1 = require_types_impl3();
76531
+ var types_1 = require_types_impl4();
76432
76532
  var ditto_codegen_types_12 = require_dist4();
76433
76533
  function shouldUseDataPrompt(params) {
76434
76534
  const { plan, previousResources } = params;
@@ -91616,11 +91716,7 @@ var require_file_operations = __commonJS({
91616
91716
  operation: zod_1.z.literal(ditto_codegen_types_12.ExtensionGenerationOperation.DELETE),
91617
91717
  path: zod_1.z.string().describe("Relative file path from project root")
91618
91718
  });
91619
- exports2.FileItemSchema = zod_1.z.discriminatedUnion("operation", [
91620
- exports2.FileCreateOrUpdateSchema,
91621
- FileDeleteSchema,
91622
- FileEditSchema
91623
- ]).describe(`Representation of an operation that modifies a file on the local file system.
91719
+ exports2.FileItemSchema = zod_1.z.union([exports2.FileCreateOrUpdateSchema, FileEditSchema, FileDeleteSchema]).describe(`Representation of an operation that modifies a file on the local file system.
91624
91720
  Use the 'insert' operation to create a new file.
91625
91721
  Use the 'delete' operation to remove a file.
91626
91722
  To modify a file, you can either use the 'edit' operation to replace a specific strings with new strings (THIS IS THE PREFERRED WAY TO MODIFY A FILE), or use the 'update' operation to replace the entire file with new content.`);
@@ -91638,7 +91734,7 @@ var require_userPrompt = __commonJS({
91638
91734
  exports2.formatEmbeddedScriptParameters = exports2.formatCollections = exports2.buildUserPromptForCodeGenerationAgent = void 0;
91639
91735
  exports2.formatExistingCollections = formatExistingCollections;
91640
91736
  exports2.formatExistingEmbeddedScriptParameters = formatExistingEmbeddedScriptParameters;
91641
- var types_1 = require_types_impl2();
91737
+ var types_1 = require_types_impl3();
91642
91738
  var ditto_codegen_types_12 = require_dist4();
91643
91739
  var buildUserPromptForCodeGenerationAgent = (params, primaryAction) => {
91644
91740
  const { extension, blueprint, scaffolds, userRequestSummary, plan, previousResources } = params;
@@ -92414,7 +92510,7 @@ var require_site_component_prompt = __commonJS({
92414
92510
  "use strict";
92415
92511
  Object.defineProperty(exports2, "__esModule", { value: true });
92416
92512
  exports2.siteComponentPrompt = exports2.siteComponentCorePrompt = void 0;
92417
- var types_1 = require_types_impl2();
92513
+ var types_1 = require_types_impl3();
92418
92514
  var site_component_instructions_1 = require_site_component_instructions();
92419
92515
  var CodeGenerationSystemPromptBuilder_1 = require_CodeGenerationSystemPromptBuilder();
92420
92516
  var createCoreBuilder = ({ useData, useIteration, apiDocumentation }) => {
@@ -92570,7 +92666,7 @@ var require_custom_element_prompt = __commonJS({
92570
92666
  "use strict";
92571
92667
  Object.defineProperty(exports2, "__esModule", { value: true });
92572
92668
  exports2.customElementPrompt = exports2.customElementCorePrompt = void 0;
92573
- var types_1 = require_types_impl2();
92669
+ var types_1 = require_types_impl3();
92574
92670
  var custom_element_instructions_1 = require_custom_element_instructions();
92575
92671
  var CodeGenerationSystemPromptBuilder_1 = require_CodeGenerationSystemPromptBuilder();
92576
92672
  var createCoreBuilder = ({ useData, useIteration, apiDocumentation }) => {
@@ -92738,7 +92834,7 @@ var require_service_plugin_prompt = __commonJS({
92738
92834
  return servicePluginDocLoader_1.fetchServicePluginDocumentation;
92739
92835
  } });
92740
92836
  var service_plugin_instructions_1 = require_service_plugin_instructions();
92741
- var types_1 = require_types_impl2();
92837
+ var types_1 = require_types_impl3();
92742
92838
  var CodeGenerationSystemPromptBuilder_1 = require_CodeGenerationSystemPromptBuilder();
92743
92839
  var createCoreBuilder = ({ useData, useIteration, apiDocumentation }) => {
92744
92840
  return (0, CodeGenerationSystemPromptBuilder_1.codeGenerationSystemPromptBuilder)({
@@ -92862,7 +92958,7 @@ var require_backend_event_prompt = __commonJS({
92862
92958
  "use strict";
92863
92959
  Object.defineProperty(exports2, "__esModule", { value: true });
92864
92960
  exports2.backendEventPrompt = exports2.backendEventCorePrompt = void 0;
92865
- var types_1 = require_types_impl2();
92961
+ var types_1 = require_types_impl3();
92866
92962
  var backend_event_instructions_1 = require_backend_event_instructions();
92867
92963
  var CodeGenerationSystemPromptBuilder_1 = require_CodeGenerationSystemPromptBuilder();
92868
92964
  var createCoreBuilder = ({ useData, useIteration, apiDocumentation }) => {
@@ -93025,7 +93121,7 @@ var require_backend_api_prompt = __commonJS({
93025
93121
  "use strict";
93026
93122
  Object.defineProperty(exports2, "__esModule", { value: true });
93027
93123
  exports2.backendApiPrompt = exports2.backendApiCorePrompt = void 0;
93028
- var types_1 = require_types_impl2();
93124
+ var types_1 = require_types_impl3();
93029
93125
  var backend_api_instructions_1 = require_backend_api_instructions();
93030
93126
  var CodeGenerationSystemPromptBuilder_1 = require_CodeGenerationSystemPromptBuilder();
93031
93127
  var createCoreBuilder = ({ useData, useIteration, apiDocumentation }) => {
@@ -93303,7 +93399,7 @@ var require_embedded_script_prompt = __commonJS({
93303
93399
  Object.defineProperty(exports2, "__esModule", { value: true });
93304
93400
  exports2.embeddedScriptPrompt = exports2.embeddedScriptCorePrompt = void 0;
93305
93401
  var dynamicParameters_1 = require_dynamicParameters2();
93306
- var types_1 = require_types_impl2();
93402
+ var types_1 = require_types_impl3();
93307
93403
  var embedded_script_instructions_1 = require_embedded_script_instructions();
93308
93404
  var CodeGenerationSystemPromptBuilder_1 = require_CodeGenerationSystemPromptBuilder();
93309
93405
  var createCoreBuilder = ({ useData, useIteration, apiDocumentation, hasDynamicParameters }) => {
@@ -93426,7 +93522,7 @@ var require_AgentsRegistry = __commonJS({
93426
93522
  exports2.generateSupportedExtensionsSection = generateSupportedExtensionsSection;
93427
93523
  exports2.getAgentDocumentation = getAgentDocumentation;
93428
93524
  exports2.getAgentCoreSystemPrompt = getAgentCoreSystemPrompt;
93429
- var types_1 = require_types_impl2();
93525
+ var types_1 = require_types_impl3();
93430
93526
  var DashboardPageAgent_1 = require_DashboardPageAgent2();
93431
93527
  var SiteComponentAgent_1 = require_SiteComponentAgent2();
93432
93528
  var CustomElementAgent_1 = require_CustomElementAgent2();
@@ -93498,7 +93594,7 @@ var require_iteration_examples = __commonJS({
93498
93594
  "use strict";
93499
93595
  Object.defineProperty(exports2, "__esModule", { value: true });
93500
93596
  exports2.iterationAgentExamples = void 0;
93501
- var types_1 = require_types_impl2();
93597
+ var types_1 = require_types_impl3();
93502
93598
  var simpleWidgetExample = {
93503
93599
  currentExtensions: [],
93504
93600
  additionalExtensions: [
@@ -100389,7 +100485,7 @@ var require_ignore = __commonJS({
100389
100485
  }
100390
100486
  });
100391
100487
 
100392
- // ../../node_modules/is-path-inside/index.js
100488
+ // ../../node_modules/globby/node_modules/is-path-inside/index.js
100393
100489
  function isPathInside(childPath, parentPath) {
100394
100490
  const relation = import_node_path.default.relative(parentPath, childPath);
100395
100491
  return Boolean(
@@ -100398,7 +100494,7 @@ function isPathInside(childPath, parentPath) {
100398
100494
  }
100399
100495
  var import_node_path;
100400
100496
  var init_is_path_inside = __esm({
100401
- "../../node_modules/is-path-inside/index.js"() {
100497
+ "../../node_modules/globby/node_modules/is-path-inside/index.js"() {
100402
100498
  import_node_path = __toESM(require("node:path"), 1);
100403
100499
  }
100404
100500
  });
@@ -101807,7 +101903,7 @@ var require_DashboardDecisionAgent = __commonJS({
101807
101903
  var zod_1 = require_zod();
101808
101904
  var codegen_dashboard_agents_1 = require_dist14();
101809
101905
  var prompt_selectors_1 = require_prompt_selectors();
101810
- var types_1 = require_types_impl2();
101906
+ var types_1 = require_types_impl3();
101811
101907
  var userPrompt_1 = require_userPrompt();
101812
101908
  var codeGenerationService_12 = require_codeGenerationService();
101813
101909
  var constants_1 = require_constants2();
@@ -101986,7 +102082,7 @@ var require_scaffolding = __commonJS({
101986
102082
  exports2.toKebabCase = toKebabCase;
101987
102083
  var tools_1 = require_tools3();
101988
102084
  var constants_1 = require_constants6();
101989
- var types_1 = require_types_impl2();
102085
+ var types_1 = require_types_impl3();
101990
102086
  var fs_1 = __importDefault2(require("fs"));
101991
102087
  var path_1 = __importDefault2(require("path"));
101992
102088
  async function copyScaffoldingTemplate(extension, outputPath) {
@@ -103031,7 +103127,7 @@ var require_UpdateExtensionAgent = __commonJS({
103031
103127
  var userPrompt_1 = require_userPrompt();
103032
103128
  var codegen_dashboard_agents_1 = require_dist14();
103033
103129
  var codeGenerationService_12 = require_codeGenerationService();
103034
- var types_1 = require_types_impl2();
103130
+ var types_1 = require_types_impl3();
103035
103131
  var UpdateExtensionAgent = class {
103036
103132
  constructor() {
103037
103133
  this.name = "UpdateExtensionAgent";
@@ -103215,7 +103311,7 @@ var require_AgentsFactory = __commonJS({
103215
103311
  "use strict";
103216
103312
  Object.defineProperty(exports2, "__esModule", { value: true });
103217
103313
  exports2.AgentsFactory = void 0;
103218
- var types_1 = require_types_impl2();
103314
+ var types_1 = require_types_impl3();
103219
103315
  var PlannerAgent_1 = require_PlannerAgent();
103220
103316
  var IterationAgent_1 = require_IterationAgent();
103221
103317
  var DashboardDecisionAgent_1 = require_DashboardDecisionAgent();
@@ -121535,7 +121631,7 @@ var require_extensionGenerators = __commonJS({
121535
121631
  var fs_extra_1 = __importDefault2(require_lib2());
121536
121632
  var crypto_12 = require("crypto");
121537
121633
  var ditto_scaffolding_1 = require_dist17();
121538
- var types_1 = require_types_impl2();
121634
+ var types_1 = require_types_impl3();
121539
121635
  var ditto_scaffolding_2 = require_dist17();
121540
121636
  var EmbeddedScriptAgent_1 = require_EmbeddedScriptAgent2();
121541
121637
  var ditto_codegen_types_12 = require_dist4();
@@ -122218,7 +122314,7 @@ var require_servicePlugin = __commonJS({
122218
122314
  "use strict";
122219
122315
  Object.defineProperty(exports2, "__esModule", { value: true });
122220
122316
  exports2.processServicePluginExtension = processServicePluginExtension;
122221
- var types_1 = require_types_impl2();
122317
+ var types_1 = require_types_impl3();
122222
122318
  var orchestrator_error_helpers_1 = require_orchestrator_error_helpers();
122223
122319
  var finalize_extension_generation_1 = require_finalize_extension_generation();
122224
122320
  var create_scaffolding_1 = require_create_scaffolding();
@@ -122306,7 +122402,7 @@ var require_embeddedScript = __commonJS({
122306
122402
  "use strict";
122307
122403
  Object.defineProperty(exports2, "__esModule", { value: true });
122308
122404
  exports2.processEmbeddedScriptExtension = processEmbeddedScriptExtension;
122309
- var types_1 = require_types_impl2();
122405
+ var types_1 = require_types_impl3();
122310
122406
  var finalize_extension_generation_1 = require_finalize_extension_generation();
122311
122407
  var create_scaffolding_1 = require_create_scaffolding();
122312
122408
  var codegen_flow_helpers_1 = require_codegen_flow_helpers();
@@ -122511,7 +122607,7 @@ var require_orchestrator = __commonJS({
122511
122607
  "use strict";
122512
122608
  Object.defineProperty(exports2, "__esModule", { value: true });
122513
122609
  exports2.DittoOrchestrator = void 0;
122514
- var types_1 = require_types_impl2();
122610
+ var types_1 = require_types_impl3();
122515
122611
  var extensionIndexer_1 = require_extensionIndexer();
122516
122612
  var orchestrator_error_helpers_1 = require_orchestrator_error_helpers();
122517
122613
  var fixFlow_1 = require_fixFlow();
@@ -336099,7 +336195,7 @@ var require_extensionAst = __commonJS({
336099
336195
  Object.defineProperty(exports2, "__esModule", { value: true });
336100
336196
  exports2.parseExtensionFileAST = parseExtensionFileAST;
336101
336197
  var ts = __importStar2(require_typescript());
336102
- var types_1 = require_types_impl2();
336198
+ var types_1 = require_types_impl3();
336103
336199
  var cms_1 = require_cms();
336104
336200
  var BUILDER_TO_EXTENSION_TYPE = {
336105
336201
  dashboardPage: types_1.ExtensionType.DASHBOARD_PAGE,
@@ -336379,7 +336475,7 @@ var require_embeddedScript2 = __commonJS({
336379
336475
  exports2.getEmbeddedScriptParameters = getEmbeddedScriptParameters;
336380
336476
  var path_1 = __importDefault2(require("path"));
336381
336477
  var fs_1 = __importDefault2(require("fs"));
336382
- var types_1 = require_types_impl2();
336478
+ var types_1 = require_types_impl3();
336383
336479
  var PARAMETER_REGEX = /\{\{(\w+)\}\}/g;
336384
336480
  async function getEmbeddedScriptParameters(extensions, outputPath) {
336385
336481
  const embeddedScripts = extensions.filter((ext) => ext.type === types_1.ExtensionType.EMBEDDED_SCRIPT);
@@ -336427,7 +336523,7 @@ var require_projectContext = __commonJS({
336427
336523
  var extension_1 = require_extension();
336428
336524
  var cms_1 = require_cms2();
336429
336525
  var embeddedScript_1 = require_embeddedScript2();
336430
- var types_1 = require_types_impl2();
336526
+ var types_1 = require_types_impl3();
336431
336527
  async function getProjectContext(outputPath) {
336432
336528
  const allBuilders = await (0, extension_1.getExtensions)(outputPath);
336433
336529
  const extensions = allBuilders.filter((ext) => ext.type !== null && ext.type !== types_1.ExtensionType.UNDEFINED_EXTENSION_TYPE);
@@ -336450,7 +336546,7 @@ var require_IterationOrchestrator = __commonJS({
336450
336546
  "use strict";
336451
336547
  Object.defineProperty(exports2, "__esModule", { value: true });
336452
336548
  exports2.IterationOrchestrator = void 0;
336453
- var types_1 = require_types_impl2();
336549
+ var types_1 = require_types_impl3();
336454
336550
  var sdkEnricher_1 = require_sdkEnricher2();
336455
336551
  var orchestrator_error_helpers_1 = require_orchestrator_error_helpers();
336456
336552
  var fixFlow_1 = require_fixFlow();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.230",
3
+ "version": "1.0.232",
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": "598568a8d8d690b4ff88202f94e8e8afb551dc33db14a9c350dbe089"
31
+ "falconPackageHash": "dc475beaff405832fd326b7ccbc45bb3e5c7649c72d572553aeae35f"
32
32
  }