@wix/cli-app 1.1.97 → 1.1.98

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 (69) hide show
  1. package/build/{AddPermissionCommand-5WDEMAQT.js → AddPermissionCommand-DYGRTPW3.js} +2 -2
  2. package/build/{CreateVersionCommand-P5USV364.js → CreateVersionCommand-7U7SHHMS.js} +3 -3
  3. package/build/{DevCommand-IREOMDTX.js → DevCommand-XFK47XPN.js} +10 -10
  4. package/build/{GenerateCommand-GE4M3AJ5.js → GenerateCommand-P6JVFBKZ.js} +98 -122
  5. package/build/GenerateCommand-P6JVFBKZ.js.map +1 -0
  6. package/build/{LogsCommand-6YLQXT36.js → LogsCommand-NCHV2GN7.js} +3 -3
  7. package/build/PreviewCommand-Q42SZUIS.js +19 -0
  8. package/build/ReleaseCommand-ICLGFGPC.js +23 -0
  9. package/build/{ServeCommand-DERBPIYF.js → ServeCommand-I6VZS2YK.js} +3 -3
  10. package/build/{build-TKRTNJPW.js → build-Z4VNDOIL.js} +6 -6
  11. package/build/{chunk-SONMTNBR.js → chunk-DSA62VDV.js} +2 -2
  12. package/build/chunk-GTPRE7FA.js +182 -0
  13. package/build/chunk-GTPRE7FA.js.map +1 -0
  14. package/build/{chunk-XR7UD5CN.js → chunk-HHUDSUDG.js} +6 -6
  15. package/build/{chunk-RMWMWFQH.js → chunk-HIQCBMWB.js} +2 -2
  16. package/build/{chunk-OOHZARMV.js → chunk-JKPPIEED.js} +7 -7
  17. package/build/{chunk-NIDWJY72.js → chunk-ONIPG3V2.js} +2 -2
  18. package/build/{chunk-XQE6EJ45.js → chunk-QYBJOKX2.js} +2 -2
  19. package/build/{chunk-QXIFG4RP.js → chunk-RGMFONBO.js} +3 -3
  20. package/build/{chunk-6U232VOB.js → chunk-SVPWVNP3.js} +152 -34
  21. package/build/{chunk-6U232VOB.js.map → chunk-SVPWVNP3.js.map} +1 -1
  22. package/build/{chunk-A3XZG5CV.js → chunk-VFINMMGN.js} +2 -2
  23. package/build/{chunk-Y7OW7ICG.js → chunk-X67AAT4X.js} +5 -5
  24. package/build/{chunk-TQQIULI5.js → chunk-X76FK2NI.js} +2 -2
  25. package/build/{chunk-7TAGHLLP.js → chunk-XGQZVXNJ.js} +3 -3
  26. package/build/{chunk-VVQKEYFV.js → chunk-Z27QYOLS.js} +29 -11
  27. package/build/{chunk-VVQKEYFV.js.map → chunk-Z27QYOLS.js.map} +1 -1
  28. package/build/{chunk-LXXN3RII.js → chunk-ZCGI26DD.js} +2 -1
  29. package/build/chunk-ZCGI26DD.js.map +1 -0
  30. package/build/{chunk-3DCNRTOG.js → chunk-ZJEKZSOD.js} +2 -2
  31. package/build/{chunk-RYRMNBF7.js → chunk-ZLQLKGPF.js} +5 -5
  32. package/build/{chunk-FNPNJNSH.js → chunk-ZVIUVZJY.js} +6 -6
  33. package/build/index.js +49 -31
  34. package/build/index.js.map +1 -1
  35. package/build/{preview-MJMZWFUW.js → preview-EBGBJIU5.js} +13 -13
  36. package/build/{release-LNE5ADW6.js → release-Y6DR4WSP.js} +15 -15
  37. package/build/{render-command-3YMVNHZ2.js → render-command-WEM3G7VN.js} +6 -6
  38. package/package.json +3 -3
  39. package/build/GenerateCommand-GE4M3AJ5.js.map +0 -1
  40. package/build/PreviewCommand-K2K72XRF.js +0 -19
  41. package/build/ReleaseCommand-E2YTBK5B.js +0 -23
  42. package/build/chunk-IN7IXPNO.js +0 -23
  43. package/build/chunk-IN7IXPNO.js.map +0 -1
  44. package/build/chunk-LXXN3RII.js.map +0 -1
  45. /package/build/{AddPermissionCommand-5WDEMAQT.js.map → AddPermissionCommand-DYGRTPW3.js.map} +0 -0
  46. /package/build/{CreateVersionCommand-P5USV364.js.map → CreateVersionCommand-7U7SHHMS.js.map} +0 -0
  47. /package/build/{DevCommand-IREOMDTX.js.map → DevCommand-XFK47XPN.js.map} +0 -0
  48. /package/build/{LogsCommand-6YLQXT36.js.map → LogsCommand-NCHV2GN7.js.map} +0 -0
  49. /package/build/{PreviewCommand-K2K72XRF.js.map → PreviewCommand-Q42SZUIS.js.map} +0 -0
  50. /package/build/{ReleaseCommand-E2YTBK5B.js.map → ReleaseCommand-ICLGFGPC.js.map} +0 -0
  51. /package/build/{ServeCommand-DERBPIYF.js.map → ServeCommand-I6VZS2YK.js.map} +0 -0
  52. /package/build/{build-TKRTNJPW.js.map → build-Z4VNDOIL.js.map} +0 -0
  53. /package/build/{chunk-SONMTNBR.js.map → chunk-DSA62VDV.js.map} +0 -0
  54. /package/build/{chunk-XR7UD5CN.js.map → chunk-HHUDSUDG.js.map} +0 -0
  55. /package/build/{chunk-RMWMWFQH.js.map → chunk-HIQCBMWB.js.map} +0 -0
  56. /package/build/{chunk-OOHZARMV.js.map → chunk-JKPPIEED.js.map} +0 -0
  57. /package/build/{chunk-NIDWJY72.js.map → chunk-ONIPG3V2.js.map} +0 -0
  58. /package/build/{chunk-XQE6EJ45.js.map → chunk-QYBJOKX2.js.map} +0 -0
  59. /package/build/{chunk-QXIFG4RP.js.map → chunk-RGMFONBO.js.map} +0 -0
  60. /package/build/{chunk-A3XZG5CV.js.map → chunk-VFINMMGN.js.map} +0 -0
  61. /package/build/{chunk-Y7OW7ICG.js.map → chunk-X67AAT4X.js.map} +0 -0
  62. /package/build/{chunk-TQQIULI5.js.map → chunk-X76FK2NI.js.map} +0 -0
  63. /package/build/{chunk-7TAGHLLP.js.map → chunk-XGQZVXNJ.js.map} +0 -0
  64. /package/build/{chunk-3DCNRTOG.js.map → chunk-ZJEKZSOD.js.map} +0 -0
  65. /package/build/{chunk-RYRMNBF7.js.map → chunk-ZLQLKGPF.js.map} +0 -0
  66. /package/build/{chunk-FNPNJNSH.js.map → chunk-ZVIUVZJY.js.map} +0 -0
  67. /package/build/{preview-MJMZWFUW.js.map → preview-EBGBJIU5.js.map} +0 -0
  68. /package/build/{release-LNE5ADW6.js.map → release-Y6DR4WSP.js.map} +0 -0
  69. /package/build/{render-command-3YMVNHZ2.js.map → render-command-WEM3G7VN.js.map} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  useAsync,
9
9
  useDevCenterClient,
10
10
  useProjectModel
11
- } from "./chunk-6U232VOB.js";
11
+ } from "./chunk-SVPWVNP3.js";
12
12
  import {
13
13
  __toESM,
14
14
  init_esm_shims
@@ -40,4 +40,4 @@ var AddPermissionCommand = ({ permissionId }) => {
40
40
  export {
41
41
  AddPermissionCommand
42
42
  };
43
- //# sourceMappingURL=AddPermissionCommand-5WDEMAQT.js.map
43
+ //# sourceMappingURL=AddPermissionCommand-DYGRTPW3.js.map
@@ -3,14 +3,14 @@ const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  createPackageManager,
5
5
  getRepoType
6
- } from "./chunk-TQQIULI5.js";
6
+ } from "./chunk-X76FK2NI.js";
7
7
  import "./chunk-GWE3BRHX.js";
8
8
  import {
9
9
  CliError,
10
10
  CliErrorCode,
11
11
  useAsync,
12
12
  useProjectModel
13
- } from "./chunk-6U232VOB.js";
13
+ } from "./chunk-SVPWVNP3.js";
14
14
  import {
15
15
  init_esm_shims
16
16
  } from "./chunk-4EFJZ3GQ.js";
@@ -42,4 +42,4 @@ var CreateVersionCommandDeprecated = () => {
42
42
  export {
43
43
  CreateVersionCommandDeprecated
44
44
  };
45
- //# sourceMappingURL=CreateVersionCommand-P5USV364.js.map
45
+ //# sourceMappingURL=CreateVersionCommand-7U7SHHMS.js.map
@@ -17,23 +17,23 @@ import {
17
17
  useResolveDashboardExtensionDevUrl,
18
18
  useResolvePlatformDevUrl,
19
19
  useSite
20
- } from "./chunk-OOHZARMV.js";
20
+ } from "./chunk-JKPPIEED.js";
21
21
  import {
22
22
  useWixCliAppBi
23
- } from "./chunk-XQE6EJ45.js";
23
+ } from "./chunk-QYBJOKX2.js";
24
24
  import {
25
25
  useBackendComponents
26
- } from "./chunk-3DCNRTOG.js";
27
- import "./chunk-SONMTNBR.js";
26
+ } from "./chunk-ZJEKZSOD.js";
27
+ import "./chunk-DSA62VDV.js";
28
28
  import "./chunk-GWE3BRHX.js";
29
- import "./chunk-A3XZG5CV.js";
29
+ import "./chunk-VFINMMGN.js";
30
30
  import {
31
31
  createLogger
32
- } from "./chunk-RMWMWFQH.js";
32
+ } from "./chunk-HIQCBMWB.js";
33
33
  import {
34
34
  createCustomElementConfig
35
- } from "./chunk-QXIFG4RP.js";
36
- import "./chunk-VVQKEYFV.js";
35
+ } from "./chunk-RGMFONBO.js";
36
+ import "./chunk-Z27QYOLS.js";
37
37
  import {
38
38
  Alert,
39
39
  Box_default,
@@ -78,7 +78,7 @@ import {
78
78
  userConfigSchema,
79
79
  writeJson,
80
80
  z
81
- } from "./chunk-6U232VOB.js";
81
+ } from "./chunk-SVPWVNP3.js";
82
82
  import {
83
83
  __toESM,
84
84
  init_esm_shims
@@ -1503,4 +1503,4 @@ var DevCommand = ({ https }) => {
1503
1503
  export {
1504
1504
  DevCommand
1505
1505
  };
1506
- //# sourceMappingURL=DevCommand-IREOMDTX.js.map
1506
+ //# sourceMappingURL=DevCommand-XFK47XPN.js.map
@@ -3,20 +3,22 @@ const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  createPackageManager,
5
5
  getRepoType
6
- } from "./chunk-TQQIULI5.js";
6
+ } from "./chunk-X76FK2NI.js";
7
7
  import {
8
- createI18nT
9
- } from "./chunk-IN7IXPNO.js";
10
- import "./chunk-LXXN3RII.js";
8
+ createI18nT,
9
+ getGenerateFlowByDocsExtensionType,
10
+ useGenerateFlows
11
+ } from "./chunk-GTPRE7FA.js";
12
+ import "./chunk-ZCGI26DD.js";
11
13
  import {
12
14
  useWixCliAppBi
13
- } from "./chunk-XQE6EJ45.js";
15
+ } from "./chunk-QYBJOKX2.js";
14
16
  import {
15
17
  componentGenerator,
16
18
  dependenciesUpdater,
17
19
  require_lodash,
18
20
  useBackendComponents
19
- } from "./chunk-3DCNRTOG.js";
21
+ } from "./chunk-ZJEKZSOD.js";
20
22
  import "./chunk-GWE3BRHX.js";
21
23
  import {
22
24
  getEcomRequiredApps,
@@ -33,7 +35,7 @@ import {
33
35
  require_setToArray,
34
36
  require_toSource,
35
37
  useExtensionDataClient
36
- } from "./chunk-VVQKEYFV.js";
38
+ } from "./chunk-Z27QYOLS.js";
37
39
  import {
38
40
  AsyncCallbackStatus,
39
41
  BACKEND_DIR,
@@ -114,7 +116,7 @@ import {
114
116
  uuidValidation,
115
117
  writeJson,
116
118
  z
117
- } from "./chunk-6U232VOB.js";
119
+ } from "./chunk-SVPWVNP3.js";
118
120
  import {
119
121
  __commonJS,
120
122
  __dirname,
@@ -703,9 +705,9 @@ var require_nodeUtil = __commonJS({
703
705
  var freeProcess = moduleExports && freeGlobal.process;
704
706
  var nodeUtil = function() {
705
707
  try {
706
- var types2 = freeModule && freeModule.require && freeModule.require("util").types;
707
- if (types2) {
708
- return types2;
708
+ var types = freeModule && freeModule.require && freeModule.require("util").types;
709
+ if (types) {
710
+ return types;
709
711
  }
710
712
  return freeProcess && freeProcess.binding && freeProcess.binding("util");
711
713
  } catch (e) {
@@ -1773,6 +1775,11 @@ var Wizard = ({ steps, name, onPrevStep }) => {
1773
1775
  const goToPreviousStep = (0, import_react2.useCallback)(() => {
1774
1776
  if (hasPreviousStep) {
1775
1777
  setActiveStep(activeStep - 1);
1778
+ }
1779
+ if (onPrevStep) {
1780
+ onPrevStep(activeStep - 1);
1781
+ }
1782
+ if (hasPreviousStep || onPrevStep) {
1776
1783
  bi.cliStepBack({
1777
1784
  additionalInfo: {
1778
1785
  activeStep,
@@ -1780,9 +1787,6 @@ var Wizard = ({ steps, name, onPrevStep }) => {
1780
1787
  }
1781
1788
  });
1782
1789
  }
1783
- if (onPrevStep) {
1784
- onPrevStep(activeStep - 1);
1785
- }
1786
1790
  }, [activeStep, hasPreviousStep, bi, name, onPrevStep]);
1787
1791
  use_input_default(
1788
1792
  (_, key) => {
@@ -4367,14 +4371,54 @@ async function generateWebMethod(projectFolder, folderPath) {
4367
4371
  init_esm_shims();
4368
4372
  var import_react27 = __toESM(require_react(), 1);
4369
4373
  import { join as join2 } from "node:path";
4370
- var SelectApiTypeStep = ({ onSubmit }) => {
4374
+ var SelectApiTypeStep = ({ onSubmit, docsExtensionType }) => {
4371
4375
  const { t: t2 } = useTranslation();
4372
4376
  const bi = useWixCliAppBi();
4373
4377
  const { isActive, goToNextStep } = useWizardStep();
4378
+ const webMethodOption = (0, import_react27.useMemo)(
4379
+ () => ({
4380
+ title: t2("generate_command.api.web_method"),
4381
+ description: t2("generate_command.api.web_method.description"),
4382
+ value: "WebMethod"
4383
+ }),
4384
+ [t2]
4385
+ );
4386
+ const httpFunctionOption = (0, import_react27.useMemo)(
4387
+ () => ({
4388
+ title: t2("generate_command.api.http_function"),
4389
+ description: t2("generate_command.api.http_function.description"),
4390
+ value: "HttpFunction"
4391
+ }),
4392
+ [t2]
4393
+ );
4394
+ const apiOption = (0, import_react27.useMemo)(() => {
4395
+ if (docsExtensionType === "HTTP_FUNCTION") {
4396
+ return InputState.Submitted(httpFunctionOption);
4397
+ }
4398
+ if (docsExtensionType === "WEB_METHOD") {
4399
+ return InputState.Submitted(webMethodOption);
4400
+ }
4401
+ }, [docsExtensionType, httpFunctionOption, webMethodOption]);
4402
+ const handleSubmit = (option) => {
4403
+ bi.cliFlowStepAnswered({
4404
+ question: t2("generate_command.api.choose_type"),
4405
+ questionKey: "generate_command.api.choose_type",
4406
+ answer: option.title,
4407
+ additionalInfo: { extensionType: option.value }
4408
+ });
4409
+ onSubmit(option.value);
4410
+ goToNextStep();
4411
+ };
4412
+ (0, import_react27.useEffect)(() => {
4413
+ if (apiOption) {
4414
+ handleSubmit(apiOption.value);
4415
+ }
4416
+ }, []);
4374
4417
  return /* @__PURE__ */ import_react27.default.createElement(
4375
4418
  SelectInput,
4376
4419
  {
4377
4420
  isActive,
4421
+ value: apiOption,
4378
4422
  info: /* @__PURE__ */ import_react27.default.createElement(
4379
4423
  Trans,
4380
4424
  {
@@ -4383,28 +4427,8 @@ var SelectApiTypeStep = ({ onSubmit }) => {
4383
4427
  }
4384
4428
  ),
4385
4429
  label: t2("generate_command.api.choose_type"),
4386
- options: [
4387
- {
4388
- title: t2("generate_command.api.web_method"),
4389
- description: t2("generate_command.api.web_method.description"),
4390
- value: "WebMethod"
4391
- },
4392
- {
4393
- title: t2("generate_command.api.http_function"),
4394
- description: t2("generate_command.api.http_function.description"),
4395
- value: "HttpFunction"
4396
- }
4397
- ],
4398
- onSubmit: (option) => {
4399
- bi.cliFlowStepAnswered({
4400
- question: t2("generate_command.api.choose_type"),
4401
- questionKey: "generate_command.api.choose_type",
4402
- answer: option.title,
4403
- additionalInfo: { extensionType: option.value }
4404
- });
4405
- onSubmit(option.value);
4406
- goToNextStep();
4407
- }
4430
+ options: [webMethodOption, httpFunctionOption],
4431
+ onSubmit: handleSubmit
4408
4432
  }
4409
4433
  );
4410
4434
  };
@@ -4481,9 +4505,10 @@ var WebMethodFolderStep = ({ onSubmit }) => {
4481
4505
  };
4482
4506
 
4483
4507
  // src/components/GenerateCommand/api/Api.tsx
4484
- var useGenerateApi = () => {
4508
+ var useGenerateApi = (docsExtensionType) => {
4485
4509
  const { t: t2 } = useTranslation();
4486
4510
  const { model } = useProjectModel();
4511
+ const [selectedDocsExtensionType, setSelectedDocsExtensionType] = (0, import_react28.useState)(() => docsExtensionType);
4487
4512
  const [apiType, setApiType] = (0, import_react28.useState)();
4488
4513
  const [apiFolder, setApiFolder] = (0, import_react28.useState)();
4489
4514
  const extensionType = apiType === "HttpFunction" ? t2("generate_command.flow.api.title").toLowerCase() : t2("generate_command.api.web_method.title").toLowerCase();
@@ -4498,7 +4523,16 @@ var useGenerateApi = () => {
4498
4523
  }
4499
4524
  }, [model.projectFolder, apiFolder]);
4500
4525
  return [
4501
- /* @__PURE__ */ import_react28.default.createElement(SelectApiTypeStep, { onSubmit: setApiType }),
4526
+ /* @__PURE__ */ import_react28.default.createElement(
4527
+ SelectApiTypeStep,
4528
+ {
4529
+ docsExtensionType: selectedDocsExtensionType,
4530
+ onSubmit: (value) => {
4531
+ setApiType(value);
4532
+ setSelectedDocsExtensionType(void 0);
4533
+ }
4534
+ }
4535
+ ),
4502
4536
  apiType === "HttpFunction" ? /* @__PURE__ */ import_react28.default.createElement(ApiFolderStep, { onSubmit: setApiFolder }) : /* @__PURE__ */ import_react28.default.createElement(WebMethodFolderStep, { onSubmit: setApiFolder }),
4503
4537
  /* @__PURE__ */ import_react28.default.createElement(
4504
4538
  CompleteGeneration,
@@ -5059,106 +5093,48 @@ var useGenerateSiteWidget = () => {
5059
5093
  };
5060
5094
 
5061
5095
  // src/components/GenerateCommand/GenerateCommand.tsx
5062
- var DevCenterGenerateFlow = (0, import_variant14.variant)((0, import_variant14.types)(DevCenterComponent));
5063
- var GenerateCommand = () => {
5096
+ var GenerateCommand = ({
5097
+ docsExtensionType
5098
+ }) => {
5064
5099
  const { t: t2 } = useTranslation();
5065
5100
  const bi = useWixCliAppBi();
5066
5101
  const dashboardPageSteps = useGenerateDashboardPage();
5067
5102
  const dashboardModalSteps = useGenerateDashboardModal();
5068
- const apiSteps = useGenerateApi();
5103
+ const apiSteps = useGenerateApi(docsExtensionType);
5069
5104
  const generateEventsSteps = useGenerateEvent();
5070
5105
  const generateServicePluginSteps = useGenerateServicePlugin();
5071
5106
  const generateEmbeddedScriptSteps = useGenerateEmbeddedScript();
5072
5107
  const generateSidebarCategorySteps = useGenerateSidebarCategory();
5073
5108
  const generateSiteWidgetSteps = useGenerateSiteWidget();
5074
- const [generateFlow, setGenerateFlow] = (0, import_react36.useState)();
5075
- const generateFlows = (0, import_react36.useMemo)(
5076
- () => [
5077
- {
5078
- title: t2("generate_command.flow.dashboard_category"),
5079
- items: [
5080
- // Uncomment after SidebarCategory is open to public
5081
- // {
5082
- // key: 'sidebar-category',
5083
- // title: t('generate_command.flow.sidebar_category'),
5084
- // value: DevCenterGenerateFlow.DashboardSidebarCategory(),
5085
- // },
5086
- {
5087
- key: "dashboard-page",
5088
- title: t2("generate_command.flow.dashboard_page"),
5089
- value: DevCenterGenerateFlow.DashboardPage()
5090
- },
5091
- {
5092
- key: "dashboard-modal",
5093
- title: t2("generate_command.flow.dashboard_modal"),
5094
- value: DevCenterGenerateFlow.DashboardModal()
5095
- },
5096
- {
5097
- key: "dashboard-plugin",
5098
- title: t2("generate_command.flow.dashboard_plugin"),
5099
- value: DevCenterGenerateFlow.DashboardPlugin()
5100
- },
5101
- {
5102
- key: "dashboard-menu-plugin",
5103
- title: t2("generate_command.flow.dashboard_menu_plugin"),
5104
- value: DevCenterGenerateFlow.DashboardMenuPlugin()
5105
- }
5106
- ]
5107
- },
5108
- {
5109
- title: t2("generate_command.flow.site_category"),
5110
- items: [
5111
- {
5112
- key: "custom-element",
5113
- title: t2("generate_command.flow.custom_element"),
5114
- value: DevCenterGenerateFlow.CustomElement()
5115
- },
5116
- {
5117
- key: "embedded-script",
5118
- title: t2("generate_command.flow.embedded_script"),
5119
- value: DevCenterGenerateFlow.EmbeddedScript()
5120
- },
5121
- {
5122
- key: "site-plugin",
5123
- title: t2("generate_command.flow.site_plugin"),
5124
- value: DevCenterGenerateFlow.SitePlugin()
5125
- }
5126
- ]
5127
- },
5128
- {
5129
- title: t2("generate_command.flow.backend_category"),
5130
- items: [
5131
- {
5132
- key: "api",
5133
- title: t2("generate_command.flow.api.title"),
5134
- value: DevCenterGenerateFlow.Api()
5135
- },
5136
- {
5137
- key: "event",
5138
- title: t2("generate_command.flow.event"),
5139
- value: DevCenterGenerateFlow.Event()
5140
- },
5141
- {
5142
- key: "service-plugin",
5143
- title: t2("generate_command.flow.service_plugin"),
5144
- value: DevCenterGenerateFlow.ServicePlugin()
5145
- }
5146
- ]
5147
- }
5148
- ],
5149
- [t2]
5150
- );
5151
- const selectFlow = (0, import_react36.useCallback)(
5109
+ const biCliFlowStepAnswered = (0, import_react36.useCallback)(
5152
5110
  (selectedType) => {
5153
5111
  bi.cliFlowStepAnswered({
5154
5112
  question: t2("generate_command.flow.choose_flow"),
5155
5113
  questionKey: "generate_command.flow.choose_flow",
5156
5114
  answer: selectedType.title
5157
5115
  });
5158
- setGenerateFlow(selectedType);
5159
5116
  },
5160
5117
  [bi, t2]
5161
5118
  );
5119
+ const [generateFlow, setGenerateFlow] = (0, import_react36.useState)(() => {
5120
+ if (docsExtensionType) {
5121
+ const selectedType = getGenerateFlowByDocsExtensionType(
5122
+ docsExtensionType,
5123
+ t2
5124
+ );
5125
+ biCliFlowStepAnswered(selectedType);
5126
+ return selectedType;
5127
+ }
5128
+ return;
5129
+ });
5130
+ const generateFlows = useGenerateFlows();
5131
+ const selectFlow = (0, import_react36.useCallback)(
5132
+ (selectedType) => {
5133
+ biCliFlowStepAnswered(selectedType);
5134
+ setGenerateFlow(selectedType);
5135
+ },
5136
+ [biCliFlowStepAnswered]
5137
+ );
5162
5138
  const handlePrevStep = (stepIdx) => {
5163
5139
  if (stepIdx < 0) {
5164
5140
  setGenerateFlow(void 0);
@@ -5250,4 +5226,4 @@ var GenerateCommand = () => {
5250
5226
  export {
5251
5227
  GenerateCommand
5252
5228
  };
5253
- //# sourceMappingURL=GenerateCommand-GE4M3AJ5.js.map
5229
+ //# sourceMappingURL=GenerateCommand-P6JVFBKZ.js.map