@wix/create-new 0.0.30 → 0.0.32

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/build/index.js CHANGED
@@ -79,13 +79,11 @@ import {
79
79
  CliErrorCode,
80
80
  CliSystemErrorCode,
81
81
  RepoType,
82
- componentGenerator,
83
82
  createPackageManager,
84
83
  execa,
85
84
  external_exports,
86
85
  generator,
87
86
  getEnvFilePath,
88
- getExtensionDir,
89
87
  getRepoType,
90
88
  getTestOverrides,
91
89
  gitClone,
@@ -113,7 +111,7 @@ import {
113
111
  writeJson,
114
112
  writePackageJson,
115
113
  zod_default
116
- } from "./chunk-OVBB732R.js";
114
+ } from "./chunk-4P3PPFXH.js";
117
115
  import {
118
116
  __commonJS,
119
117
  __dirname,
@@ -15350,12 +15348,12 @@ var require_lodash = __commonJS({
15350
15348
  Stack.prototype.has = stackHas;
15351
15349
  Stack.prototype.set = stackSet;
15352
15350
  function arrayLikeKeys(value2, inherited) {
15353
- var isArr = isArray3(value2), isArg = !isArr && isArguments(value2), isBuff = !isArr && !isArg && isBuffer(value2), isType21 = !isArr && !isArg && !isBuff && isTypedArray(value2), skipIndexes = isArr || isArg || isBuff || isType21, result = skipIndexes ? baseTimes(value2.length, String) : [], length = result.length;
15351
+ var isArr = isArray3(value2), isArg = !isArr && isArguments(value2), isBuff = !isArr && !isArg && isBuffer(value2), isType20 = !isArr && !isArg && !isBuff && isTypedArray(value2), skipIndexes = isArr || isArg || isBuff || isType20, result = skipIndexes ? baseTimes(value2.length, String) : [], length = result.length;
15354
15352
  for (var key in value2) {
15355
15353
  if ((inherited || hasOwnProperty3.call(value2, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
15356
15354
  (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
15357
15355
  isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
15358
- isType21 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
15356
+ isType20 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
15359
15357
  isIndex(key, length)))) {
15360
15358
  result.push(key);
15361
15359
  }
@@ -32549,10 +32547,10 @@ var require_kebabCase = __commonJS({
32549
32547
  "use strict";
32550
32548
  init_esm_shims();
32551
32549
  var createCompounder = require_createCompounder();
32552
- var kebabCase4 = createCompounder(function(result, word, index) {
32550
+ var kebabCase5 = createCompounder(function(result, word, index) {
32553
32551
  return result + (index ? "-" : "") + word.toLowerCase();
32554
32552
  });
32555
- module2.exports = kebabCase4;
32553
+ module2.exports = kebabCase5;
32556
32554
  }
32557
32555
  });
32558
32556
 
@@ -32870,7 +32868,7 @@ var require_util = __commonJS({
32870
32868
  return path4;
32871
32869
  });
32872
32870
  exports.normalize = normalize4;
32873
- function join22(aRoot, aPath) {
32871
+ function join20(aRoot, aPath) {
32874
32872
  if (aRoot === "") {
32875
32873
  aRoot = ".";
32876
32874
  }
@@ -32902,7 +32900,7 @@ var require_util = __commonJS({
32902
32900
  }
32903
32901
  return joined;
32904
32902
  }
32905
- exports.join = join22;
32903
+ exports.join = join20;
32906
32904
  exports.isAbsolute = function(aPath) {
32907
32905
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
32908
32906
  };
@@ -33116,7 +33114,7 @@ var require_util = __commonJS({
33116
33114
  parsed.path = parsed.path.substring(0, index + 1);
33117
33115
  }
33118
33116
  }
33119
- sourceURL = join22(urlGenerate(parsed), sourceURL);
33117
+ sourceURL = join20(urlGenerate(parsed), sourceURL);
33120
33118
  }
33121
33119
  return normalize4(sourceURL);
33122
33120
  }
@@ -50354,10 +50352,10 @@ var RenewTokenData = (0, import_variant.variant)({
50354
50352
  var AuthClient = class {
50355
50353
  constructor(httpClient) {
50356
50354
  this.httpClient = httpClient;
50357
- const { minRetryTimeout: minRetryTimeout5 } = getTestOverrides();
50355
+ const { minRetryTimeout: minRetryTimeout4 } = getTestOverrides();
50358
50356
  this.retryOptions = {
50359
50357
  retries: 3,
50360
- minTimeout: minRetryTimeout5,
50358
+ minTimeout: minRetryTimeout4,
50361
50359
  maxTimeout: 3 * 1e3
50362
50360
  };
50363
50361
  }
@@ -51102,6 +51100,23 @@ var accountAuthStrategy = {
51102
51100
  async login({ deviceCode: deviceCode2, signal }) {
51103
51101
  const accountAuth = await waitForLogin(deviceCode2, { signal });
51104
51102
  return createAccountAuthState(accountAuth);
51103
+ },
51104
+ async loginWithRefreshToken({ refreshToken }) {
51105
+ const renewTokenResult = await client.renewToken({ refreshToken });
51106
+ if ((0, import_variant4.isType)(renewTokenResult, RenewTokenData.TokenRenewed)) {
51107
+ const newTokenData = renewTokenResult.payload;
51108
+ const userInfo2 = await client.userInfo({
51109
+ accessToken: newTokenData.accessToken
51110
+ });
51111
+ const result = { ...newTokenData, userInfo: userInfo2 };
51112
+ await deleteAuthData();
51113
+ await saveAuthData(result);
51114
+ return createAccountAuthState(result);
51115
+ }
51116
+ throw new CliError({
51117
+ code: CliErrorCode.FailedToLoginWithRefreshToken(),
51118
+ cause: null
51119
+ });
51105
51120
  }
51106
51121
  };
51107
51122
 
@@ -58190,19 +58205,28 @@ var useBiLogger = () => {
58190
58205
  return context2;
58191
58206
  };
58192
58207
 
58193
- // ../../node_modules/@wix/bi-logger-wix-cli/dist/esm/v2/index.js
58208
+ // ../../node_modules/@wix/bi-logger-dev-tools-data/dist/esm/v2/index.js
58194
58209
  init_esm_shims();
58195
58210
  function wixCliCliCommand(params) {
58196
- return { evid: 5200, src: 11, endpoint: "wix-cli", params };
58211
+ return { evid: 5200, src: 11, endpoint: "", params };
58197
58212
  }
58198
58213
  function wixCliCliCommandStatus(params) {
58199
- return { evid: 5201, src: 11, endpoint: "wix-cli", params };
58214
+ return { evid: 5201, src: 11, endpoint: "", params };
58200
58215
  }
58201
58216
  function wixCliLoginStart(params) {
58202
- return { evid: 5211, src: 11, endpoint: "wix-cli", params };
58217
+ return { evid: 5211, src: 11, endpoint: "", params };
58203
58218
  }
58204
58219
  function wixCliLoginEnd(params) {
58205
- return { evid: 5212, src: 11, endpoint: "wix-cli", params };
58220
+ return { evid: 5212, src: 11, endpoint: "", params };
58221
+ }
58222
+ function wixCliAppFlowStepsAnswers(params) {
58223
+ return { evid: 5229, src: 11, endpoint: "", params };
58224
+ }
58225
+ function wixCliCliError(params) {
58226
+ return { evid: 5230, src: 11, endpoint: "", params };
58227
+ }
58228
+ function wixCliAction(params) {
58229
+ return { evid: 5231, src: 11, endpoint: "", params };
58206
58230
  }
58207
58231
 
58208
58232
  // ../cli-auth/src/components/Login.tsx
@@ -65282,7 +65306,9 @@ var createEnv = () => {
65282
65306
  return {
65283
65307
  isCI: overrides2.isCI ?? import_ci_info.default.isCI,
65284
65308
  isPR: overrides2.isPR ?? import_ci_info.default.isPR,
65285
- ciName: overrides2.ciName ?? import_ci_info.default.name ?? process.env.CI_NAME ?? null
65309
+ ciName: overrides2.ciName ?? import_ci_info.default.name ?? process.env.CI_NAME ?? null,
65310
+ cliEnvName: overrides2.cliEnvName ?? process.env.WIX_RUNTIME_ENVIRONMENT ?? null,
65311
+ cliTrackingId: overrides2.cliTrackingId ?? process.env.TRACKING_ID ?? null
65286
65312
  };
65287
65313
  };
65288
65314
 
@@ -65611,6 +65637,15 @@ function getErrorComponent(code, cause) {
65611
65637
  }
65612
65638
  );
65613
65639
  },
65640
+ FailedToLoginWithRefreshToken: () => {
65641
+ return () => /* @__PURE__ */ import_react82.default.createElement(
65642
+ ErrorMessage,
65643
+ {
65644
+ message: "Failed to login with refresh token",
65645
+ hint: "Please check that your refresh token is valid and not revoked, then try again."
65646
+ }
65647
+ );
65648
+ },
65614
65649
  FailedToRevokeRefreshToken: ({ email }) => {
65615
65650
  return () => /* @__PURE__ */ import_react82.default.createElement(
65616
65651
  SystemErrorMessage,
@@ -69780,6 +69815,9 @@ function toSafeJson(value2) {
69780
69815
  }
69781
69816
  return value2;
69782
69817
  }
69818
+ function normalizeRequestId(requestId) {
69819
+ return requestId.split(",").map((id) => id.trim()).at(0) ?? requestId;
69820
+ }
69783
69821
 
69784
69822
  // ../cli-error-reporting/src/error-reporter.ts
69785
69823
  var ReportErrorResult = (0, import_variant18.variant)({
@@ -69796,7 +69834,10 @@ var reportError = (scope, originalError, { data } = {}) => {
69796
69834
  captureContext: (localScope) => {
69797
69835
  const httpError = extractHttpError(error);
69798
69836
  if (httpError) {
69799
- localScope.setTag("request.id", httpError.requestId);
69837
+ localScope.setTag(
69838
+ "request.id",
69839
+ normalizeRequestId(httpError.requestId)
69840
+ );
69800
69841
  const errorInfo = getHttpErrorInfo(httpError);
69801
69842
  errorInfo.request.data = toSafeJson(errorInfo.request.data);
69802
69843
  errorInfo.response.data = toSafeJson(errorInfo.response.data);
@@ -69809,9 +69850,11 @@ var reportError = (scope, originalError, { data } = {}) => {
69809
69850
  "Full Stack": import_verror3.default.fullStack(error)
69810
69851
  });
69811
69852
  }
69812
- const { isCI: isCI3, isPR, ciName } = createEnv();
69853
+ const { isCI: isCI3, isPR, ciName, cliEnvName, cliTrackingId } = createEnv();
69813
69854
  localScope.setTag("ci", yesOrNo(isCI3));
69814
69855
  localScope.setTag("ci.name", ciName);
69856
+ localScope.setTag("cli.env_name", cliEnvName);
69857
+ localScope.setTag("cli.tracking_id", cliTrackingId);
69815
69858
  localScope.setContext("CI", {
69816
69859
  Name: ciName,
69817
69860
  "Is CI": yesOrNo(isCI3),
@@ -71609,20 +71652,6 @@ var import_react102 = __toESM(require_react(), 1);
71609
71652
 
71610
71653
  // ../create-new-packages/app-command/src/bi/events.ts
71611
71654
  init_esm_shims();
71612
-
71613
- // ../../node_modules/@wix/bi-logger-dev-tools-data/dist/esm/v2/index.js
71614
- init_esm_shims();
71615
- function wixCliAppFlowStepsAnswers(params) {
71616
- return { evid: 5229, src: 11, endpoint: "", params };
71617
- }
71618
- function wixCliCliError(params) {
71619
- return { evid: 5230, src: 11, endpoint: "", params };
71620
- }
71621
- function wixCliAction(params) {
71622
- return { evid: 5231, src: 11, endpoint: "", params };
71623
- }
71624
-
71625
- // ../create-new-packages/app-command/src/bi/events.ts
71626
71655
  var createAppBiEvents = (biLogger) => ({
71627
71656
  cliAction: ({
71628
71657
  question,
@@ -71812,7 +71841,7 @@ function reportCommandStartEvent({
71812
71841
  }) {
71813
71842
  const options = command.opts();
71814
71843
  const args = command.args;
71815
- const privateOptions = /* @__PURE__ */ new Set(["apiKey"]);
71844
+ const privateOptions = /* @__PURE__ */ new Set(["apiKey", "refreshToken"]);
71816
71845
  const sanitizedOptions = Object.fromEntries(
71817
71846
  Object.entries(options).map(([flagName, flagValue]) => {
71818
71847
  const value2 = privateOptions.has(flagName) ? "<censored>" : flagValue;
@@ -79868,10 +79897,10 @@ var EMPTY_SITE_TEMPLATE = "24bafe8a-7c80-4b63-8a71-08752062f246";
79868
79897
  var DevCenterClient = class {
79869
79898
  constructor(httpClient) {
79870
79899
  this.httpClient = httpClient;
79871
- const { minRetryTimeout: minRetryTimeout5 } = getTestOverrides();
79900
+ const { minRetryTimeout: minRetryTimeout4 } = getTestOverrides();
79872
79901
  this.retryOptions = {
79873
79902
  retries: 3,
79874
- minTimeout: minRetryTimeout5,
79903
+ minTimeout: minRetryTimeout4,
79875
79904
  maxTimeout: 3 * 1e3
79876
79905
  };
79877
79906
  }
@@ -82042,7 +82071,7 @@ function getTasks({
82042
82071
  cause: e2
82043
82072
  });
82044
82073
  }
82045
- const { generateApp } = await import("./generator-MFLMNWRL.js");
82074
+ const { generateApp } = await import("./generator-L3CXBMWA.js");
82046
82075
  await generateApp({
82047
82076
  packageName,
82048
82077
  packageFolder,
@@ -82085,7 +82114,7 @@ function getTasks({
82085
82114
  "--yes",
82086
82115
  "skills",
82087
82116
  "add",
82088
- "wix/skills/wix-cli",
82117
+ "wix/skills",
82089
82118
  // The `skills` CLI uses -y/--yes to skip prompts.
82090
82119
  "-y"
82091
82120
  ];
@@ -82567,7 +82596,7 @@ var validateProjectName = (value2) => {
82567
82596
  // ../create-new-packages/headless-command/src/components/LinkCommand/LinkCommand.tsx
82568
82597
  init_esm_shims();
82569
82598
  var import_react139 = __toESM(require_react(), 1);
82570
- var import_variant44 = __toESM(require_lib(), 1);
82599
+ var import_variant43 = __toESM(require_lib(), 1);
82571
82600
 
82572
82601
  // ../create-new-packages/headless-command/src/components/WelcomeMessage.tsx
82573
82602
  init_esm_shims();
@@ -82686,17 +82715,10 @@ var CreateProjectResponseSchema = external_exports.object({
82686
82715
  });
82687
82716
 
82688
82717
  // ../create-new-packages/headless-command/src/clients/funnel-projects/funnel-projects-client.ts
82689
- var { minRetryTimeout: minRetryTimeout2 } = getTestOverrides();
82690
82718
  var FunnelProjectsClient = class {
82691
82719
  constructor(httpClient) {
82692
82720
  this.httpClient = httpClient;
82693
- this.retryOptions = {
82694
- retries: 3,
82695
- minTimeout: minRetryTimeout2,
82696
- maxTimeout: 3 * 1e3
82697
- };
82698
82721
  }
82699
- retryOptions;
82700
82722
  createProject = async (siteName, templateId) => {
82701
82723
  try {
82702
82724
  const { data } = await this.httpClient.request(
@@ -83022,8 +83044,16 @@ function useMetasiteManagerClient() {
83022
83044
 
83023
83045
  // ../create-new-packages/headless-command/src/hooks/create-project.ts
83024
83046
  var DEFAULT_ENVIRONMENT_NAME2 = "system_global";
83025
- function generateSlugSalt() {
83026
- return randomBytes2(4).toString("hex");
83047
+ function generateSlug(projectName) {
83048
+ const base = (0, import_kebabCase3.default)(projectName).replaceAll(/[^a-z0-9-]/gi, "").slice(0, 10).replace(/-$/, "");
83049
+ const salt = randomBytes2(4).toString("hex");
83050
+ return `${base}-${salt}`;
83051
+ }
83052
+ function truncateName(name, maxLength) {
83053
+ if (name.length > maxLength) {
83054
+ return `${name.slice(0, maxLength - 3)}...`;
83055
+ }
83056
+ return name;
83027
83057
  }
83028
83058
  var useCreateProject = (businessId) => {
83029
83059
  const { createOAuthApp: createOAuthApp2, updateOAuthApp: updateOAuthApp2, getAppSecret } = useDevCenterClient();
@@ -83035,7 +83065,7 @@ var useCreateProject = (businessId) => {
83035
83065
  cloudProviders
83036
83066
  }) => {
83037
83067
  const { id: projectId } = await createOAuthApp2({
83038
- name: `Private App for: ${projectName}`
83068
+ name: truncateName(`Private App for: ${projectName}`, 50)
83039
83069
  });
83040
83070
  const [publicKeyAndSecret, instanceId] = await Promise.all([
83041
83071
  getAppSecret({ appId: projectId }),
@@ -83044,21 +83074,12 @@ var useCreateProject = (businessId) => {
83044
83074
  appId: projectId
83045
83075
  })
83046
83076
  ]);
83047
- const baseSlug = (0, import_kebabCase3.default)(projectName);
83048
- const appProject = await pRetry(
83049
- async (attempt) => {
83050
- const slug = attempt === 1 ? baseSlug : `${baseSlug}-${generateSlugSalt()}`;
83051
- return await createAppProject2({
83052
- id: projectId,
83053
- displayName: projectName,
83054
- slug,
83055
- cloudProvider: cloudProviders?.[0]
83056
- });
83057
- },
83058
- {
83059
- retries: 1
83060
- }
83061
- );
83077
+ const appProject = await createAppProject2({
83078
+ id: projectId,
83079
+ displayName: truncateName(projectName, 50),
83080
+ slug: generateSlug(projectName),
83081
+ cloudProvider: cloudProviders?.[0]
83082
+ });
83062
83083
  const loginRoute = `api/auth/callback`;
83063
83084
  const logoutRoute = `api/auth/logout-callback`;
83064
83085
  const projectBaseURL = new URL(appProject.baseUrl);
@@ -83147,7 +83168,7 @@ var CreateProject = ({
83147
83168
  // ../create-new-packages/headless-command/src/components/LinkCommand/GenerateProject.tsx
83148
83169
  init_esm_shims();
83149
83170
  var import_react137 = __toESM(require_react(), 1);
83150
- var import_variant43 = __toESM(require_lib(), 1);
83171
+ var import_variant42 = __toESM(require_lib(), 1);
83151
83172
 
83152
83173
  // ../cli-project-extender/src/index.ts
83153
83174
  init_esm_shims();
@@ -92198,83 +92219,11 @@ async function extend2(projectFolder) {
92198
92219
  await modifyAstroConfig(projectFolder);
92199
92220
  }
92200
92221
 
92201
- // ../cli-project-extender/src/add-files-from-template.ts
92202
- init_esm_shims();
92203
- import { join as join15 } from "node:path";
92204
- import { randomUUID as randomUUID3 } from "node:crypto";
92205
- var import_variant41 = __toESM(require_lib(), 1);
92206
-
92207
- // ../cli-project-extender/src/clone-templates-repo.ts
92208
- init_esm_shims();
92209
- import { join as join14 } from "node:path";
92210
- import { rm as rm2 } from "node:fs/promises";
92211
- async function cloneTemplatesRepo(url) {
92212
- const repoDir = temporaryDirectory({ prefix: "wix-cli-project-extender" });
92213
- try {
92214
- await gitClone(url, repoDir);
92215
- await rm2(join14(repoDir, ".git"), { recursive: true, force: true });
92216
- } catch (e2) {
92217
- throw new CliError({
92218
- code: CliErrorCode.FailedToCloneRepo(),
92219
- cause: e2
92220
- });
92221
- }
92222
- return repoDir;
92223
- }
92224
-
92225
- // ../cli-project-extender/src/add-files-from-template.ts
92226
- var TEMPLATE_REPO = "git@github.com:wix-incubator/headless-cli-templates.git";
92227
- async function addFilesFromTemplate(projectFolder, templateId, packageManager2, repoType2) {
92228
- const repoRoot = await cloneTemplatesRepo(TEMPLATE_REPO);
92229
- const templateExtensionRoot = join15(repoRoot, "templates", templateId);
92230
- const sharedTemplate = join15(repoRoot, "templates-shared");
92231
- if (await pathExists(sharedTemplate)) {
92232
- await componentGenerator({
92233
- template: sharedTemplate,
92234
- projectFolder,
92235
- cwd: projectFolder,
92236
- data: {
92237
- packageManager: {
92238
- name: packageManager2.name
92239
- },
92240
- isMonorepo: (0, import_variant41.isType)(repoType2, RepoType.Monorepo)
92241
- }
92242
- });
92243
- }
92244
- if (!await pathExists(templateExtensionRoot)) {
92245
- return;
92246
- }
92247
- const extensionTemplates = await globby("*", {
92248
- onlyDirectories: true,
92249
- cwd: templateExtensionRoot
92250
- });
92251
- for (const template of extensionTemplates) {
92252
- const uniqueDir = await getUniqueExtensionPath(projectFolder, template, 0);
92253
- await componentGenerator({
92254
- template: join15(templateExtensionRoot, template),
92255
- projectFolder,
92256
- cwd: join15(getExtensionDir(projectFolder), uniqueDir),
92257
- data: {
92258
- randomUUID: () => randomUUID3(),
92259
- dir: uniqueDir
92260
- }
92261
- });
92262
- }
92263
- }
92264
- async function getUniqueExtensionPath(projectFolder, extensionPath, suffix) {
92265
- const uniqueExtensionPath = suffix ? `${extensionPath}${suffix}` : extensionPath;
92266
- const path4 = join15(getExtensionDir(projectFolder), uniqueExtensionPath);
92267
- if (!await pathExists(path4)) {
92268
- return uniqueExtensionPath;
92269
- }
92270
- return getUniqueExtensionPath(projectFolder, extensionPath, suffix + 1);
92271
- }
92272
-
92273
92222
  // ../create-new-packages/headless-command/src/task-runner.ts
92274
92223
  init_esm_shims();
92275
92224
  var import_react135 = __toESM(require_react(), 1);
92276
- var import_variant42 = __toESM(require_lib(), 1);
92277
- var TaskRunnerStatus2 = (0, import_variant42.variant)({
92225
+ var import_variant41 = __toESM(require_lib(), 1);
92226
+ var TaskRunnerStatus2 = (0, import_variant41.variant)({
92278
92227
  Idle: {},
92279
92228
  Running: (runningTasks, totalTaskCount) => {
92280
92229
  const taskStatuses = runningTasks.map((task, index) => {
@@ -92386,7 +92335,7 @@ var GenerateProject = ({ projectFolder, businessId, projectData, onDone, package
92386
92335
  await executeTaskRunner(tasks);
92387
92336
  onDone(true);
92388
92337
  }, []);
92389
- return (0, import_variant43.match)(taskRunnerStatus, {
92338
+ return (0, import_variant42.match)(taskRunnerStatus, {
92390
92339
  Idle: () => null,
92391
92340
  Running: (status) => /* @__PURE__ */ import_react137.default.createElement(GenerationProgress2, { ...status }),
92392
92341
  Done: (status) => /* @__PURE__ */ import_react137.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react137.default.createElement(GenerationProgress2, { ...status }), /* @__PURE__ */ import_react137.default.createElement(Box_default, { marginLeft: -2, marginTop: 1 }, /* @__PURE__ */ import_react137.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react137.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react137.default.createElement(Text2, null, "Project set up successfully"))))
@@ -92454,7 +92403,7 @@ var LinkCommand = ({
92454
92403
  const packageManager2 = await createPackageManager(repoType2);
92455
92404
  return { repoType: repoType2, packageManager: packageManager2 };
92456
92405
  }, []);
92457
- return (0, import_variant44.match)(status, {
92406
+ return (0, import_variant43.match)(status, {
92458
92407
  Error: () => null,
92459
92408
  Loading: () => /* @__PURE__ */ import_react139.default.createElement(Spinner2, { text: "Loading..." }),
92460
92409
  Success: ({ result: { packageManager: packageManager2 } }) => {
@@ -92555,12 +92504,12 @@ var validateCloudProvider = (value2) => {
92555
92504
  // ../create-new-packages/headless-command/src/components/ProcessCommand.tsx
92556
92505
  init_esm_shims();
92557
92506
  var import_react150 = __toESM(require_react(), 1);
92558
- var import_variant54 = __toESM(require_lib(), 1);
92507
+ var import_variant53 = __toESM(require_lib(), 1);
92559
92508
 
92560
92509
  // ../create-new-packages/headless-command/src/parse-command-options.ts
92561
92510
  init_esm_shims();
92562
- var import_variant46 = __toESM(require_lib(), 1);
92563
- import { join as join16 } from "node:path";
92511
+ var import_variant45 = __toESM(require_lib(), 1);
92512
+ import { join as join14 } from "node:path";
92564
92513
 
92565
92514
  // ../create-new-packages/headless-command/src/validations/index.ts
92566
92515
  init_esm_shims();
@@ -92578,11 +92527,11 @@ async function validateDirectory2(projectRoot) {
92578
92527
  // ../create-new-packages/headless-command/src/validations/package-name.ts
92579
92528
  init_esm_shims();
92580
92529
  var import_validate_npm_package_name2 = __toESM(require_lib2(), 1);
92581
- var import_variant45 = __toESM(require_lib(), 1);
92582
- var Result2 = (0, import_variant45.variant)(
92583
- (0, import_variant45.onTerms)(({ T }) => ({
92584
- Error: (0, import_variant45.payload)(T),
92585
- Ok: import_variant45.nil
92530
+ var import_variant44 = __toESM(require_lib(), 1);
92531
+ var Result2 = (0, import_variant44.variant)(
92532
+ (0, import_variant44.onTerms)(({ T }) => ({
92533
+ Error: (0, import_variant44.payload)(T),
92534
+ Ok: import_variant44.nil
92586
92535
  }))
92587
92536
  );
92588
92537
  async function validatePackageName2(name) {
@@ -92652,10 +92601,10 @@ var headlessTemplates = [
92652
92601
  ...vibeCompatibleTemplates,
92653
92602
  ...pureHeadlessTemplates
92654
92603
  ];
92655
- var TemplateSource2 = (0, import_variant46.variant)({
92656
- HeadlessApp: (0, import_variant46.fields)(),
92657
- GitRepo: (0, import_variant46.fields)(),
92658
- Local: (0, import_variant46.fields)()
92604
+ var TemplateSource2 = (0, import_variant45.variant)({
92605
+ HeadlessApp: (0, import_variant45.fields)(),
92606
+ GitRepo: (0, import_variant45.fields)(),
92607
+ Local: (0, import_variant45.fields)()
92659
92608
  });
92660
92609
  function parseProviderString(cloudProvider) {
92661
92610
  switch (cloudProvider.trim().toLowerCase()) {
@@ -92715,7 +92664,7 @@ async function parseTemplateOptions2(options) {
92715
92664
  async function parseProjectNameOptions(targetParentFolder2, options) {
92716
92665
  const projectName = options.projectName;
92717
92666
  if (projectName) {
92718
- if (!await validateDirectory2(join16(targetParentFolder2, projectName))) {
92667
+ if (!await validateDirectory2(join14(targetParentFolder2, projectName))) {
92719
92668
  throw new CliError({
92720
92669
  code: CliErrorCode.ProjectNameArgumentIsInvalid({
92721
92670
  errorMessage: `"${projectName}" directory is not empty`
@@ -92724,7 +92673,7 @@ async function parseProjectNameOptions(targetParentFolder2, options) {
92724
92673
  });
92725
92674
  }
92726
92675
  const npmValidationErrors = await validatePackageName2(projectName);
92727
- if ((0, import_variant46.isType)(npmValidationErrors, "Error")) {
92676
+ if ((0, import_variant45.isType)(npmValidationErrors, "Error")) {
92728
92677
  throw new CliError({
92729
92678
  code: CliErrorCode.ProjectNameArgumentIsInvalid({
92730
92679
  errorMessage: `Invalid package name "${projectName}". Please fix the following issues: ${npmValidationErrors.payload.join(", ")}`
@@ -92780,20 +92729,21 @@ async function parseCommandOptions2(targetParentFolder2, options) {
92780
92729
  // ../create-new-packages/headless-command/src/components/CreateHeadlessSiteCommand.tsx
92781
92730
  init_esm_shims();
92782
92731
  var import_react149 = __toESM(require_react(), 1);
92783
- var import_variant53 = __toESM(require_lib(), 1);
92784
- import { join as join21 } from "node:path";
92732
+ var import_variant52 = __toESM(require_lib(), 1);
92733
+ var import_kebabCase4 = __toESM(require_kebabCase(), 1);
92734
+ import { join as join19 } from "node:path";
92785
92735
 
92786
92736
  // ../create-new-packages/headless-command/src/components/ChooseFolder.tsx
92787
92737
  init_esm_shims();
92788
92738
  var import_react140 = __toESM(require_react(), 1);
92789
- var import_variant47 = __toESM(require_lib(), 1);
92790
- import { join as join17 } from "node:path";
92739
+ var import_variant46 = __toESM(require_lib(), 1);
92740
+ import { join as join15 } from "node:path";
92791
92741
  var validateAppDirectory = async (targetParentFolder2, packageName) => {
92792
- if (!await validateDirectory2(join17(targetParentFolder2, packageName))) {
92742
+ if (!await validateDirectory2(join15(targetParentFolder2, packageName))) {
92793
92743
  return `Provided directory "${packageName}" is not empty`;
92794
92744
  }
92795
92745
  const npmValidationErrors = await validatePackageName2(packageName);
92796
- return (0, import_variant47.match)(npmValidationErrors, {
92746
+ return (0, import_variant46.match)(npmValidationErrors, {
92797
92747
  Ok: () => true,
92798
92748
  Error: ({ payload: payload7 }) => `Invalid folder name. Please fix the following issues: ${payload7.join(", ")}`
92799
92749
  });
@@ -92819,19 +92769,19 @@ var ChooseFolder = ({ initialFolderName, targetParentFolder: targetParentFolder2
92819
92769
  init_esm_shims();
92820
92770
  import { mkdir as mkdir2 } from "node:fs/promises";
92821
92771
  var import_react141 = __toESM(require_react(), 1);
92822
- var import_variant48 = __toESM(require_lib(), 1);
92823
- import { join as join19 } from "node:path";
92772
+ var import_variant47 = __toESM(require_lib(), 1);
92773
+ import { join as join17 } from "node:path";
92824
92774
 
92825
92775
  // ../create-new-packages/headless-command/src/services/generator/template-fetcher.ts
92826
92776
  init_esm_shims();
92827
- import { join as join18 } from "node:path";
92828
- import { rm as rm3 } from "node:fs/promises";
92777
+ import { join as join16 } from "node:path";
92778
+ import { rm as rm2 } from "node:fs/promises";
92829
92779
  var import_is_git_url3 = __toESM(require_is_git_url(), 1);
92830
92780
  async function downloadAndExtractRepo(url) {
92831
92781
  const repoDir = temporaryDirectory({ prefix: "wix-create-headless-site" });
92832
92782
  try {
92833
92783
  await gitClone(url, repoDir);
92834
- await rm3(join18(repoDir, ".git"), { recursive: true, force: true });
92784
+ await rm2(join16(repoDir, ".git"), { recursive: true, force: true });
92835
92785
  return repoDir;
92836
92786
  } catch (e2) {
92837
92787
  throw new CliError({
@@ -92849,7 +92799,7 @@ async function fetchTemplate(url, path4 = ".") {
92849
92799
  });
92850
92800
  }
92851
92801
  const repoDir = await downloadAndExtractRepo(url);
92852
- const templateDirInRepo = join18(repoDir, path4);
92802
+ const templateDirInRepo = join16(repoDir, path4);
92853
92803
  if (!await pathExists(templateDirInRepo)) {
92854
92804
  throw new CliError({
92855
92805
  code: CliErrorCode.TemplatePathNotFound({ templatePath: path4 }),
@@ -92866,7 +92816,7 @@ async function resolveTemplateFolder(templatePathOverride, selectedTemplate) {
92866
92816
  if (templatePathOverride) {
92867
92817
  return templatePathOverride;
92868
92818
  }
92869
- return (0, import_variant48.match)(selectedTemplate, {
92819
+ return (0, import_variant47.match)(selectedTemplate, {
92870
92820
  HeadlessApp: ({ gitPath }) => fetchTemplate(headlessTemplatesGitUrl, gitPath),
92871
92821
  GitRepo: ({ url, path: path4 }) => fetchTemplate(url, path4),
92872
92822
  Local: ({ path: path4 }) => path4
@@ -92876,7 +92826,6 @@ var GenerationProgress3 = ({ tasks, totalTaskCount }) => {
92876
92826
  return /* @__PURE__ */ import_react141.default.createElement(import_react141.default.Fragment, null, /* @__PURE__ */ import_react141.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react141.default.createElement(Text2, null, "Generating your headless site...")), /* @__PURE__ */ import_react141.default.createElement(TaskList2, { tasks, totalTaskCount }));
92877
92827
  };
92878
92828
  var GenerateProject2 = ({
92879
- repoType: repoType2,
92880
92829
  packageManager: packageManager2,
92881
92830
  targetParentFolder: targetParentFolder2,
92882
92831
  folderName,
@@ -92886,10 +92835,9 @@ var GenerateProject2 = ({
92886
92835
  selectedTemplate,
92887
92836
  onDone
92888
92837
  }) => {
92889
- const { reportError: reportError2 } = useErrorReporter();
92890
92838
  const { execute: executeTaskRunner, status: taskRunnerStatus } = useTaskRunner2();
92891
92839
  const packageFolder = (0, import_react141.useMemo)(
92892
- () => join19(targetParentFolder2, folderName),
92840
+ () => join17(targetParentFolder2, folderName),
92893
92841
  [folderName, targetParentFolder2]
92894
92842
  );
92895
92843
  const generateProject = (0, import_react141.useCallback)(async () => {
@@ -92935,23 +92883,7 @@ var GenerateProject2 = ({
92935
92883
  ]);
92936
92884
  const extendProject = (0, import_react141.useCallback)(async () => {
92937
92885
  await extend2(packageFolder);
92938
- try {
92939
- await addFilesFromTemplate(
92940
- packageFolder,
92941
- selectedTemplate.siteTemplateId,
92942
- packageManager2,
92943
- repoType2
92944
- );
92945
- } catch (error) {
92946
- reportError2(error);
92947
- }
92948
- }, [
92949
- packageFolder,
92950
- selectedTemplate.siteTemplateId,
92951
- reportError2,
92952
- packageManager2,
92953
- repoType2
92954
- ]);
92886
+ }, [packageFolder]);
92955
92887
  const initializeGit = (0, import_react141.useCallback)(async () => {
92956
92888
  try {
92957
92889
  await gitInit(packageFolder);
@@ -93036,7 +92968,7 @@ var GenerateProject2 = ({
93036
92968
  await executeTaskRunner(tasks);
93037
92969
  onDone(true);
93038
92970
  }, []);
93039
- return (0, import_variant48.match)(taskRunnerStatus, {
92971
+ return (0, import_variant47.match)(taskRunnerStatus, {
93040
92972
  Idle: () => null,
93041
92973
  Running: (status) => /* @__PURE__ */ import_react141.default.createElement(GenerationProgress3, { ...status }),
93042
92974
  Done: (status) => /* @__PURE__ */ import_react141.default.createElement(Box_default, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ import_react141.default.createElement(GenerationProgress3, { ...status }), /* @__PURE__ */ import_react141.default.createElement(Box_default, { marginLeft: -2, marginTop: 1 }, /* @__PURE__ */ import_react141.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react141.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react141.default.createElement(Text2, null, "Project set up successfully"))))
@@ -93085,7 +93017,7 @@ var ChooseTemplate2 = ({ onSubmit }) => {
93085
93017
  // ../create-new-packages/headless-command/src/components/ReleaseProject.tsx
93086
93018
  init_esm_shims();
93087
93019
  var import_react144 = __toESM(require_react(), 1);
93088
- var import_variant50 = __toESM(require_lib(), 1);
93020
+ var import_variant49 = __toESM(require_lib(), 1);
93089
93021
 
93090
93022
  // ../create-new-packages/headless-command/src/components/FinishedSuccessfullyMessage.tsx
93091
93023
  init_esm_shims();
@@ -93111,9 +93043,9 @@ var FinishedSuccessfullyMessage3 = ({ packageManager: packageManager2, folderNam
93111
93043
 
93112
93044
  // ../create-new-packages/headless-command/src/hooks/release-project.ts
93113
93045
  init_esm_shims();
93114
- var import_variant49 = __toESM(require_lib(), 1);
93115
- import { join as join20 } from "node:path";
93116
- var ReleaseStateVariant = (0, import_variant49.variant)({
93046
+ var import_variant48 = __toESM(require_lib(), 1);
93047
+ import { join as join18 } from "node:path";
93048
+ var ReleaseStateVariant = (0, import_variant48.variant)({
93117
93049
  Success: {},
93118
93050
  Skipped: {},
93119
93051
  Error: {}
@@ -93129,7 +93061,7 @@ var useReleaseProject = () => {
93129
93061
  if (!confirmed) {
93130
93062
  return ReleaseStateVariant.Skipped();
93131
93063
  }
93132
- const packageFolder = join20(targetParentFolder2, folderName);
93064
+ const packageFolder = join18(targetParentFolder2, folderName);
93133
93065
  try {
93134
93066
  const buildCommand = packageManager2.getRunBinaryCmd(["wix", "build"]);
93135
93067
  const releaseCommand = packageManager2.getRunBinaryCmd([
@@ -93185,10 +93117,10 @@ var ReleaseProject = ({
93185
93117
  });
93186
93118
  }
93187
93119
  }
93188
- )), (0, import_variant50.match)(status, {
93120
+ )), (0, import_variant49.match)(status, {
93189
93121
  NotRequested: () => null,
93190
93122
  Success: ({ result }) => {
93191
- return /* @__PURE__ */ import_react144.default.createElement(import_react144.default.Fragment, null, (0, import_variant50.match)(result, {
93123
+ return /* @__PURE__ */ import_react144.default.createElement(import_react144.default.Fragment, null, (0, import_variant49.match)(result, {
93192
93124
  Success: () => /* @__PURE__ */ import_react144.default.createElement(Box_default, { marginLeft: -2 }, /* @__PURE__ */ import_react144.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react144.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react144.default.createElement(Text2, null, "Site published successfully"))),
93193
93125
  Skipped: () => /* @__PURE__ */ import_react144.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager2.getRunCmd()} release`),
93194
93126
  Error: () => /* @__PURE__ */ import_react144.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react144.default.createElement(Alert, { type: "error" }, "Failed to publish your site"), /* @__PURE__ */ import_react144.default.createElement(Text2, null, `No worries, you can publish your site later by running ${packageManager2.getRunCmd()} release`))
@@ -93198,7 +93130,7 @@ var ReleaseProject = ({
93198
93130
  packageManager: packageManager2,
93199
93131
  folderName,
93200
93132
  projectData,
93201
- isReleased: (0, import_variant50.isType)(result, "Success")
93133
+ isReleased: (0, import_variant49.isType)(result, "Success")
93202
93134
  }
93203
93135
  ));
93204
93136
  },
@@ -93210,8 +93142,8 @@ var ReleaseProject = ({
93210
93142
  // ../create-new-packages/headless-command/src/components/ChooseVibeSetup.tsx
93211
93143
  init_esm_shims();
93212
93144
  var import_react145 = __toESM(require_react(), 1);
93213
- var import_variant51 = __toESM(require_lib(), 1);
93214
- var VibeSetupChoice = (0, import_variant51.variant)({
93145
+ var import_variant50 = __toESM(require_lib(), 1);
93146
+ var VibeSetupChoice = (0, import_variant50.variant)({
93215
93147
  SetupVibe: {},
93216
93148
  Skip: {}
93217
93149
  });
@@ -93243,7 +93175,7 @@ var ChooseVibeSetup = ({ onSubmit }) => {
93243
93175
  // ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
93244
93176
  init_esm_shims();
93245
93177
  var import_react148 = __toESM(require_react(), 1);
93246
- var import_variant52 = __toESM(require_lib(), 1);
93178
+ var import_variant51 = __toESM(require_lib(), 1);
93247
93179
 
93248
93180
  // ../velo-client/src/index.ts
93249
93181
  init_esm_shims();
@@ -93756,13 +93688,13 @@ var getResolveNpmDependenciesResultSchema = external_exports.object({
93756
93688
  var getWixLockFileSchema = external_exports.string();
93757
93689
 
93758
93690
  // ../velo-client/src/velo-client.ts
93759
- var { minRetryTimeout: minRetryTimeout3, pollInterval, pollTimeout } = getTestOverrides();
93691
+ var { minRetryTimeout: minRetryTimeout2, pollInterval, pollTimeout } = getTestOverrides();
93760
93692
  var VeloClient = class {
93761
93693
  constructor(httpClient) {
93762
93694
  this.httpClient = httpClient;
93763
93695
  this.retryOptions = {
93764
93696
  retries: 3,
93765
- minTimeout: minRetryTimeout3,
93697
+ minTimeout: minRetryTimeout2,
93766
93698
  maxTimeout: 3 * 1e3
93767
93699
  };
93768
93700
  }
@@ -94098,13 +94030,13 @@ var CreateProjectResponseSchema2 = external_exports.object({
94098
94030
  });
94099
94031
 
94100
94032
  // ../codestore-client/src/codestore-client.ts
94101
- var { minRetryTimeout: minRetryTimeout4 } = getTestOverrides();
94033
+ var { minRetryTimeout: minRetryTimeout3 } = getTestOverrides();
94102
94034
  var CodestoreClient = class {
94103
94035
  constructor(httpClient) {
94104
94036
  this.httpClient = httpClient;
94105
94037
  this.retryOptions = {
94106
94038
  retries: 3,
94107
- minTimeout: minRetryTimeout4,
94039
+ minTimeout: minRetryTimeout3,
94108
94040
  maxTimeout: 3 * 1e3
94109
94041
  };
94110
94042
  }
@@ -94159,8 +94091,8 @@ function useCodestoreClient() {
94159
94091
  }
94160
94092
 
94161
94093
  // ../create-new-packages/headless-command/src/components/VibeRepositorySetupPolling.tsx
94162
- var VibeSetupResult = (0, import_variant52.variant)({
94163
- Success: (0, import_variant52.fields)(),
94094
+ var VibeSetupResult = (0, import_variant51.variant)({
94095
+ Success: (0, import_variant51.fields)(),
94164
94096
  Canceled: {},
94165
94097
  Failed: {}
94166
94098
  });
@@ -94222,7 +94154,7 @@ var VibeRepositorySetupPolling = ({
94222
94154
  [projectFolder, projectId],
94223
94155
  {
94224
94156
  onSuccess: (result) => {
94225
- if ((0, import_variant52.isType)(result, VibeSetupResult.Success)) {
94157
+ if ((0, import_variant51.isType)(result, VibeSetupResult.Success)) {
94226
94158
  onSubmit?.();
94227
94159
  }
94228
94160
  },
@@ -94233,10 +94165,10 @@ var VibeRepositorySetupPolling = ({
94233
94165
  }
94234
94166
  }
94235
94167
  );
94236
- return (0, import_variant52.match)(status, {
94168
+ return (0, import_variant51.match)(status, {
94237
94169
  Error: () => /* @__PURE__ */ import_react148.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react148.default.createElement(Text2, { skin: "error" }, "Failed to connect to Wix Vibe")),
94238
94170
  Loading: () => /* @__PURE__ */ import_react148.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react148.default.createElement(Spinner2, { text: "Opening browser for Wix Vibe setup..." }), /* @__PURE__ */ import_react148.default.createElement(Text2, { skin: "secondary" }, "Complete the setup in your browser. We're waiting for you to finish...")),
94239
- Success: ({ result }) => (0, import_variant52.match)(result, {
94171
+ Success: ({ result }) => (0, import_variant51.match)(result, {
94240
94172
  Success: ({ repoName, htmlUrl }) => /* @__PURE__ */ import_react148.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react148.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react148.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react148.default.createElement(Text2, null, "GitHub repository '", repoName, "' created and Synced.", " ", /* @__PURE__ */ import_react148.default.createElement(Link, { url: htmlUrl }, "View Repository.")))),
94241
94173
  Canceled: () => null
94242
94174
  })
@@ -94266,22 +94198,22 @@ var CreateHeadlessSiteCommand = ({
94266
94198
  const [vibeSetupChoice, setVibeSetupChoice] = (0, import_react149.useState)();
94267
94199
  const [vibeSetupDone, setVibeSetupDone] = (0, import_react149.useState)(false);
94268
94200
  const projectFolder = (0, import_react149.useMemo)(
94269
- () => folderName ? join21(targetParentFolder2, folderName) : void 0,
94201
+ () => folderName ? join19(targetParentFolder2, folderName) : void 0,
94270
94202
  [targetParentFolder2, folderName]
94271
94203
  );
94272
94204
  const { status } = useAsync2(async () => {
94273
94205
  const repoType2 = await getRepoType(targetParentFolder2);
94274
94206
  const packageManager2 = await createPackageManager(repoType2);
94275
- return { repoType: repoType2, packageManager: packageManager2 };
94207
+ return { packageManager: packageManager2 };
94276
94208
  }, []);
94277
94209
  const isVibeCompatible = (0, import_react149.useMemo)(
94278
- () => (0, import_variant53.isType)(selectedTemplate, "HeadlessApp") && selectedTemplate.vibeCompatible,
94210
+ () => (0, import_variant52.isType)(selectedTemplate, "HeadlessApp") && selectedTemplate.vibeCompatible,
94279
94211
  [selectedTemplate]
94280
94212
  );
94281
- return (0, import_variant53.match)(status, {
94213
+ return (0, import_variant52.match)(status, {
94282
94214
  Error: () => null,
94283
94215
  Loading: () => /* @__PURE__ */ import_react149.default.createElement(Spinner2, { text: "Loading..." }),
94284
- Success: ({ result: { packageManager: packageManager2, repoType: repoType2 } }) => {
94216
+ Success: ({ result: { packageManager: packageManager2 } }) => {
94285
94217
  return /* @__PURE__ */ import_react149.default.createElement(
94286
94218
  Box_default,
94287
94219
  {
@@ -94319,7 +94251,7 @@ var CreateHeadlessSiteCommand = ({
94319
94251
  !defaultProjectName && businessName && selectedTemplate && businessId && /* @__PURE__ */ import_react149.default.createElement(
94320
94252
  ChooseFolder,
94321
94253
  {
94322
- initialFolderName: businessName,
94254
+ initialFolderName: (0, import_kebabCase4.default)(businessName),
94323
94255
  targetParentFolder: targetParentFolder2,
94324
94256
  onSubmit: ({ folderName: folderName2 }) => setFolderName(folderName2)
94325
94257
  }
@@ -94328,7 +94260,7 @@ var CreateHeadlessSiteCommand = ({
94328
94260
  CreateProject,
94329
94261
  {
94330
94262
  businessId,
94331
- projectName: folderName,
94263
+ projectName: businessName,
94332
94264
  cloudProviders,
94333
94265
  onSubmit: (data) => setProjectData(data)
94334
94266
  }
@@ -94339,7 +94271,6 @@ var CreateHeadlessSiteCommand = ({
94339
94271
  folderName,
94340
94272
  businessId,
94341
94273
  projectData,
94342
- repoType: repoType2,
94343
94274
  packageManager: packageManager2,
94344
94275
  targetParentFolder: targetParentFolder2,
94345
94276
  commandOptions,
@@ -94353,7 +94284,7 @@ var CreateHeadlessSiteCommand = ({
94353
94284
  onSubmit: (choice) => setVibeSetupChoice(choice)
94354
94285
  }
94355
94286
  ),
94356
- businessName && selectedTemplate && businessId && projectData && projectFolder && generationDone && isVibeCompatible && (0, import_variant53.isType)(vibeSetupChoice, "SetupVibe") && /* @__PURE__ */ import_react149.default.createElement(AccountAuthProvider, null, /* @__PURE__ */ import_react149.default.createElement(
94287
+ businessName && selectedTemplate && businessId && projectData && projectFolder && generationDone && isVibeCompatible && (0, import_variant52.isType)(vibeSetupChoice, "SetupVibe") && /* @__PURE__ */ import_react149.default.createElement(AccountAuthProvider, null, /* @__PURE__ */ import_react149.default.createElement(
94357
94288
  VibeRepositorySetupPolling,
94358
94289
  {
94359
94290
  projectId: projectData.projectId,
@@ -94361,7 +94292,7 @@ var CreateHeadlessSiteCommand = ({
94361
94292
  onSubmit: () => setVibeSetupDone(true)
94362
94293
  }
94363
94294
  )),
94364
- businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0, import_variant53.isType)(vibeSetupChoice, "Skip") || !isVibeCompatible) && /* @__PURE__ */ import_react149.default.createElement(
94295
+ businessName && selectedTemplate && businessId && projectData && folderName && generationDone && (vibeSetupDone || (0, import_variant52.isType)(vibeSetupChoice, "Skip") || !isVibeCompatible) && /* @__PURE__ */ import_react149.default.createElement(
94365
94296
  ReleaseProject,
94366
94297
  {
94367
94298
  folderName,
@@ -94399,7 +94330,7 @@ var ProcessCommand = ({ targetParentFolder: targetParentFolder2, commandOptions
94399
94330
  }
94400
94331
  return result;
94401
94332
  }, []);
94402
- return (0, import_variant54.match)(status, {
94333
+ return (0, import_variant53.match)(status, {
94403
94334
  Error: () => null,
94404
94335
  Loading: () => /* @__PURE__ */ import_react150.default.createElement(Spinner2, { text: "Loading..." }),
94405
94336
  Success: ({
@@ -94426,12 +94357,12 @@ init_esm_shims();
94426
94357
 
94427
94358
  // ../create-new-packages/headless-command/src/bi/createBiLogger.ts
94428
94359
  init_esm_shims();
94429
- import { randomUUID as randomUUID4 } from "node:crypto";
94360
+ import { randomUUID as randomUUID3 } from "node:crypto";
94430
94361
  var createBiLogger3 = async (errorReporter2, cliVersion, userId) => {
94431
94362
  const biLogger = await createBiLogger(
94432
94363
  {
94433
94364
  command: "create-headless-site",
94434
- cliSessionId: randomUUID4(),
94365
+ cliSessionId: randomUUID3(),
94435
94366
  cliVersion
94436
94367
  },
94437
94368
  userId
@@ -94609,7 +94540,7 @@ var getHeadlessCommand = ({
94609
94540
  var package_default = {
94610
94541
  name: "@wix/create-new",
94611
94542
  description: "General entry point for creating Wix projects",
94612
- version: "0.0.30",
94543
+ version: "0.0.32",
94613
94544
  bin: "bin/index.cjs",
94614
94545
  devDependencies: {
94615
94546
  "@commander-js/extra-typings": "^13.0.0",