@wix/create-new 0.0.49 → 0.0.51

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
@@ -1259,7 +1259,7 @@ var require_command = __commonJS({
1259
1259
  var childProcess2 = __require("node:child_process");
1260
1260
  var path4 = __require("node:path");
1261
1261
  var fs6 = __require("node:fs");
1262
- var process22 = __require("node:process");
1262
+ var process23 = __require("node:process");
1263
1263
  var { Argument: Argument2, humanReadableArgName } = require_argument();
1264
1264
  var { CommanderError: CommanderError2 } = require_error();
1265
1265
  var { Help: Help2, stripColor } = require_help();
@@ -1306,13 +1306,13 @@ var require_command = __commonJS({
1306
1306
  this._showSuggestionAfterError = true;
1307
1307
  this._savedState = null;
1308
1308
  this._outputConfiguration = {
1309
- writeOut: (str) => process22.stdout.write(str),
1310
- writeErr: (str) => process22.stderr.write(str),
1309
+ writeOut: (str) => process23.stdout.write(str),
1310
+ writeErr: (str) => process23.stderr.write(str),
1311
1311
  outputError: (str, write) => write(str),
1312
- getOutHelpWidth: () => process22.stdout.isTTY ? process22.stdout.columns : void 0,
1313
- getErrHelpWidth: () => process22.stderr.isTTY ? process22.stderr.columns : void 0,
1314
- getOutHasColors: () => useColor() ?? (process22.stdout.isTTY && process22.stdout.hasColors?.()),
1315
- getErrHasColors: () => useColor() ?? (process22.stderr.isTTY && process22.stderr.hasColors?.()),
1312
+ getOutHelpWidth: () => process23.stdout.isTTY ? process23.stdout.columns : void 0,
1313
+ getErrHelpWidth: () => process23.stderr.isTTY ? process23.stderr.columns : void 0,
1314
+ getOutHasColors: () => useColor() ?? (process23.stdout.isTTY && process23.stdout.hasColors?.()),
1315
+ getErrHasColors: () => useColor() ?? (process23.stderr.isTTY && process23.stderr.hasColors?.()),
1316
1316
  stripColor: (str) => stripColor(str)
1317
1317
  };
1318
1318
  this._hidden = false;
@@ -1695,7 +1695,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1695
1695
  if (this._exitCallback) {
1696
1696
  this._exitCallback(new CommanderError2(exitCode, code, message));
1697
1697
  }
1698
- process22.exit(exitCode);
1698
+ process23.exit(exitCode);
1699
1699
  }
1700
1700
  /**
1701
1701
  * Register callback `fn` for the command.
@@ -2093,16 +2093,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
2093
2093
  }
2094
2094
  parseOptions = parseOptions || {};
2095
2095
  if (argv === void 0 && parseOptions.from === void 0) {
2096
- if (process22.versions?.electron) {
2096
+ if (process23.versions?.electron) {
2097
2097
  parseOptions.from = "electron";
2098
2098
  }
2099
- const execArgv = process22.execArgv ?? [];
2099
+ const execArgv = process23.execArgv ?? [];
2100
2100
  if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) {
2101
2101
  parseOptions.from = "eval";
2102
2102
  }
2103
2103
  }
2104
2104
  if (argv === void 0) {
2105
- argv = process22.argv;
2105
+ argv = process23.argv;
2106
2106
  }
2107
2107
  this.rawArgs = argv.slice();
2108
2108
  let userArgs;
@@ -2113,7 +2113,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2113
2113
  userArgs = argv.slice(2);
2114
2114
  break;
2115
2115
  case "electron":
2116
- if (process22.defaultApp) {
2116
+ if (process23.defaultApp) {
2117
2117
  this._scriptPath = argv[1];
2118
2118
  userArgs = argv.slice(2);
2119
2119
  } else {
@@ -2300,11 +2300,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
2300
2300
  }
2301
2301
  launchWithNode = sourceExt.includes(path4.extname(executableFile));
2302
2302
  let proc;
2303
- if (process22.platform !== "win32") {
2303
+ if (process23.platform !== "win32") {
2304
2304
  if (launchWithNode) {
2305
2305
  args.unshift(executableFile);
2306
- args = incrementNodeInspectorPort(process22.execArgv).concat(args);
2307
- proc = childProcess2.spawn(process22.argv[0], args, { stdio: "inherit" });
2306
+ args = incrementNodeInspectorPort(process23.execArgv).concat(args);
2307
+ proc = childProcess2.spawn(process23.argv[0], args, { stdio: "inherit" });
2308
2308
  } else {
2309
2309
  proc = childProcess2.spawn(executableFile, args, { stdio: "inherit" });
2310
2310
  }
@@ -2315,13 +2315,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
2315
2315
  subcommand._name
2316
2316
  );
2317
2317
  args.unshift(executableFile);
2318
- args = incrementNodeInspectorPort(process22.execArgv).concat(args);
2319
- proc = childProcess2.spawn(process22.execPath, args, { stdio: "inherit" });
2318
+ args = incrementNodeInspectorPort(process23.execArgv).concat(args);
2319
+ proc = childProcess2.spawn(process23.execPath, args, { stdio: "inherit" });
2320
2320
  }
2321
2321
  if (!proc.killed) {
2322
2322
  const signals = ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"];
2323
2323
  signals.forEach((signal) => {
2324
- process22.on(signal, () => {
2324
+ process23.on(signal, () => {
2325
2325
  if (proc.killed === false && proc.exitCode === null) {
2326
2326
  proc.kill(signal);
2327
2327
  }
@@ -2332,7 +2332,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2332
2332
  proc.on("close", (code) => {
2333
2333
  code = code ?? 1;
2334
2334
  if (!exitCallback) {
2335
- process22.exit(code);
2335
+ process23.exit(code);
2336
2336
  } else {
2337
2337
  exitCallback(
2338
2338
  new CommanderError2(
@@ -2354,7 +2354,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2354
2354
  throw new Error(`'${executableFile}' not executable`);
2355
2355
  }
2356
2356
  if (!exitCallback) {
2357
- process22.exit(1);
2357
+ process23.exit(1);
2358
2358
  } else {
2359
2359
  const wrappedError = new CommanderError2(
2360
2360
  1,
@@ -2849,13 +2849,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
2849
2849
  */
2850
2850
  _parseOptionsEnv() {
2851
2851
  this.options.forEach((option) => {
2852
- if (option.envVar && option.envVar in process22.env) {
2852
+ if (option.envVar && option.envVar in process23.env) {
2853
2853
  const optionKey = option.attributeName();
2854
2854
  if (this.getOptionValue(optionKey) === void 0 || ["default", "config", "env"].includes(
2855
2855
  this.getOptionValueSource(optionKey)
2856
2856
  )) {
2857
2857
  if (option.required || option.optional) {
2858
- this.emit(`optionEnv:${option.name()}`, process22.env[option.envVar]);
2858
+ this.emit(`optionEnv:${option.name()}`, process23.env[option.envVar]);
2859
2859
  } else {
2860
2860
  this.emit(`optionEnv:${option.name()}`);
2861
2861
  }
@@ -3310,7 +3310,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
3310
3310
  */
3311
3311
  help(contextOptions) {
3312
3312
  this.outputHelp(contextOptions);
3313
- let exitCode = Number(process22.exitCode ?? 0);
3313
+ let exitCode = Number(process23.exitCode ?? 0);
3314
3314
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) {
3315
3315
  exitCode = 1;
3316
3316
  }
@@ -3400,9 +3400,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
3400
3400
  });
3401
3401
  }
3402
3402
  function useColor() {
3403
- if (process22.env.NO_COLOR || process22.env.FORCE_COLOR === "0" || process22.env.FORCE_COLOR === "false")
3403
+ if (process23.env.NO_COLOR || process23.env.FORCE_COLOR === "0" || process23.env.FORCE_COLOR === "false")
3404
3404
  return false;
3405
- if (process22.env.FORCE_COLOR || process22.env.CLICOLOR_FORCE !== void 0)
3405
+ if (process23.env.FORCE_COLOR || process23.env.CLICOLOR_FORCE !== void 0)
3406
3406
  return true;
3407
3407
  return void 0;
3408
3408
  }
@@ -9263,11 +9263,11 @@ var require_signal_exit = __commonJS({
9263
9263
  "../../node_modules/ink/node_modules/signal-exit/index.js"(exports, module2) {
9264
9264
  "use strict";
9265
9265
  init_esm_shims();
9266
- var process22 = global.process;
9267
- var processOk = function(process23) {
9268
- return process23 && typeof process23 === "object" && typeof process23.removeListener === "function" && typeof process23.emit === "function" && typeof process23.reallyExit === "function" && typeof process23.listeners === "function" && typeof process23.kill === "function" && typeof process23.pid === "number" && typeof process23.on === "function";
9266
+ var process23 = global.process;
9267
+ var processOk = function(process24) {
9268
+ return process24 && typeof process24 === "object" && typeof process24.removeListener === "function" && typeof process24.emit === "function" && typeof process24.reallyExit === "function" && typeof process24.listeners === "function" && typeof process24.kill === "function" && typeof process24.pid === "number" && typeof process24.on === "function";
9269
9269
  };
9270
- if (!processOk(process22)) {
9270
+ if (!processOk(process23)) {
9271
9271
  module2.exports = function() {
9272
9272
  return function() {
9273
9273
  };
@@ -9275,15 +9275,15 @@ var require_signal_exit = __commonJS({
9275
9275
  } else {
9276
9276
  assert = __require("assert");
9277
9277
  signals = require_signals();
9278
- isWin = /^win/i.test(process22.platform);
9278
+ isWin = /^win/i.test(process23.platform);
9279
9279
  EE = __require("events");
9280
9280
  if (typeof EE !== "function") {
9281
9281
  EE = EE.EventEmitter;
9282
9282
  }
9283
- if (process22.__signal_exit_emitter__) {
9284
- emitter = process22.__signal_exit_emitter__;
9283
+ if (process23.__signal_exit_emitter__) {
9284
+ emitter = process23.__signal_exit_emitter__;
9285
9285
  } else {
9286
- emitter = process22.__signal_exit_emitter__ = new EE();
9286
+ emitter = process23.__signal_exit_emitter__ = new EE();
9287
9287
  emitter.count = 0;
9288
9288
  emitter.emitted = {};
9289
9289
  }
@@ -9320,12 +9320,12 @@ var require_signal_exit = __commonJS({
9320
9320
  loaded = false;
9321
9321
  signals.forEach(function(sig) {
9322
9322
  try {
9323
- process22.removeListener(sig, sigListeners[sig]);
9323
+ process23.removeListener(sig, sigListeners[sig]);
9324
9324
  } catch (er) {
9325
9325
  }
9326
9326
  });
9327
- process22.emit = originalProcessEmit;
9328
- process22.reallyExit = originalProcessReallyExit;
9327
+ process23.emit = originalProcessEmit;
9328
+ process23.reallyExit = originalProcessReallyExit;
9329
9329
  emitter.count -= 1;
9330
9330
  };
9331
9331
  module2.exports.unload = unload;
@@ -9342,7 +9342,7 @@ var require_signal_exit = __commonJS({
9342
9342
  if (!processOk(global.process)) {
9343
9343
  return;
9344
9344
  }
9345
- var listeners = process22.listeners(sig);
9345
+ var listeners = process23.listeners(sig);
9346
9346
  if (listeners.length === emitter.count) {
9347
9347
  unload();
9348
9348
  emit("exit", null, sig);
@@ -9350,7 +9350,7 @@ var require_signal_exit = __commonJS({
9350
9350
  if (isWin && sig === "SIGHUP") {
9351
9351
  sig = "SIGINT";
9352
9352
  }
9353
- process22.kill(process22.pid, sig);
9353
+ process23.kill(process23.pid, sig);
9354
9354
  }
9355
9355
  };
9356
9356
  });
@@ -9366,36 +9366,36 @@ var require_signal_exit = __commonJS({
9366
9366
  emitter.count += 1;
9367
9367
  signals = signals.filter(function(sig) {
9368
9368
  try {
9369
- process22.on(sig, sigListeners[sig]);
9369
+ process23.on(sig, sigListeners[sig]);
9370
9370
  return true;
9371
9371
  } catch (er) {
9372
9372
  return false;
9373
9373
  }
9374
9374
  });
9375
- process22.emit = processEmit;
9376
- process22.reallyExit = processReallyExit;
9375
+ process23.emit = processEmit;
9376
+ process23.reallyExit = processReallyExit;
9377
9377
  };
9378
9378
  module2.exports.load = load;
9379
- originalProcessReallyExit = process22.reallyExit;
9379
+ originalProcessReallyExit = process23.reallyExit;
9380
9380
  processReallyExit = function processReallyExit2(code) {
9381
9381
  if (!processOk(global.process)) {
9382
9382
  return;
9383
9383
  }
9384
- process22.exitCode = code || /* istanbul ignore next */
9384
+ process23.exitCode = code || /* istanbul ignore next */
9385
9385
  0;
9386
- emit("exit", process22.exitCode, null);
9387
- emit("afterexit", process22.exitCode, null);
9388
- originalProcessReallyExit.call(process22, process22.exitCode);
9386
+ emit("exit", process23.exitCode, null);
9387
+ emit("afterexit", process23.exitCode, null);
9388
+ originalProcessReallyExit.call(process23, process23.exitCode);
9389
9389
  };
9390
- originalProcessEmit = process22.emit;
9390
+ originalProcessEmit = process23.emit;
9391
9391
  processEmit = function processEmit2(ev, arg) {
9392
9392
  if (ev === "exit" && processOk(global.process)) {
9393
9393
  if (arg !== void 0) {
9394
- process22.exitCode = arg;
9394
+ process23.exitCode = arg;
9395
9395
  }
9396
9396
  var ret = originalProcessEmit.apply(this, arguments);
9397
- emit("exit", process22.exitCode, null);
9398
- emit("afterexit", process22.exitCode, null);
9397
+ emit("exit", process23.exitCode, null);
9398
+ emit("afterexit", process23.exitCode, null);
9399
9399
  return ret;
9400
9400
  } else {
9401
9401
  return originalProcessEmit.apply(this, arguments);
@@ -66621,7 +66621,7 @@ function getErrorComponent(code, cause) {
66621
66621
  return () => /* @__PURE__ */ import_react82.default.createElement(ErrorMessage, { message: "Failed to generate a self-signed certificate for development." });
66622
66622
  },
66623
66623
  NonInteractiveTerminal: () => {
66624
- return () => /* @__PURE__ */ import_react82.default.createElement(ErrorMessage, { message: "This command is not supported in non-interactive terminals. Please run the command in an interactive terminal (TTY)." });
66624
+ return () => /* @__PURE__ */ import_react82.default.createElement(ErrorMessage, { message: "This command is not supported in non-interactive terminals. Run with --help to see flags for non-interactive usage, or use an interactive terminal (TTY)." });
66625
66625
  },
66626
66626
  FailedToResolveViteOrigin: () => {
66627
66627
  return () => /* @__PURE__ */ import_react82.default.createElement(ErrorMessage, { message: "Failed to resolve the base url for CSS asset urls" });
@@ -81245,15 +81245,13 @@ async function parseAppNameOptions(targetParentFolder2, options) {
81245
81245
  return AppNameOptions.Missing();
81246
81246
  }
81247
81247
  async function parseCommandOptions(targetParentFolder2, options, clients) {
81248
- const template = await parseTemplateOptions(options, clients);
81248
+ let template = await parseTemplateOptions(
81249
+ options,
81250
+ clients
81251
+ );
81249
81252
  const appNameOptions = await parseAppNameOptions(targetParentFolder2, options);
81250
- if ((0, import_variant28.isType)(appNameOptions, "Provided") && !template) {
81251
- throw new CliError({
81252
- code: CliErrorCode.AppNameArgumentIsInvalid({
81253
- errorMessage: "An application name was provided, but no template was specified. Please specify a template when defining the application name."
81254
- }),
81255
- cause: void 0
81256
- });
81253
+ if (!template && (0, import_variant28.isType)(appNameOptions, "Provided")) {
81254
+ template = TemplateSource.Default();
81257
81255
  }
81258
81256
  return { template, appName: appNameOptions };
81259
81257
  }
@@ -83543,6 +83541,7 @@ var getAppCommand = ({
83543
83541
  // ../create-new-packages/headless-command/src/index.tsx
83544
83542
  init_esm_shims();
83545
83543
  var import_react156 = __toESM(require_react(), 1);
83544
+ import process22 from "node:process";
83546
83545
 
83547
83546
  // ../create-new-packages/headless-command/src/validations/validate-business-name.ts
83548
83547
  init_esm_shims();
@@ -93993,54 +93992,8 @@ var LinkCommand = ({
93993
93992
  });
93994
93993
  };
93995
93994
 
93996
- // ../create-new-packages/headless-command/src/validations/uuid.ts
93995
+ // ../create-new-packages/headless-command/src/validations/site-template.ts
93997
93996
  init_esm_shims();
93998
- function validateUUID2(value2) {
93999
- const parsed = external_exports.string().uuid().safeParse(value2);
94000
- if (parsed.success) {
94001
- return parsed.data;
94002
- }
94003
- throw new InvalidArgumentError("Value must be a valid GUID");
94004
- }
94005
-
94006
- // ../create-new-packages/headless-command/src/validations/git-url.ts
94007
- init_esm_shims();
94008
- var import_is_git_url2 = __toESM(require_is_git_url(), 1);
94009
- function validateGitUrl2(value2) {
94010
- if ((0, import_is_git_url2.default)(value2)) {
94011
- return value2;
94012
- }
94013
- throw new InvalidArgumentError("Value must be a valid Git URL");
94014
- }
94015
-
94016
- // ../create-new-packages/headless-command/src/validations/validate-template-params.ts
94017
- init_esm_shims();
94018
- var schema4 = external_exports.string().transform((value2) => JSON.parse(value2)).pipe(external_exports.record(external_exports.unknown()));
94019
- function validateTemplateParams2(value2) {
94020
- try {
94021
- return schema4.parse(value2);
94022
- } catch {
94023
- throw new InvalidArgumentError("Value must be a valid JSON object string.");
94024
- }
94025
- }
94026
-
94027
- // ../create-new-packages/headless-command/src/validations/validate-cloud-provider.ts
94028
- init_esm_shims();
94029
- var validateCloudProvider = (value2) => {
94030
- const allowedValues = ["cloudflare", "kubernetes"];
94031
- const normalizedValue = value2.toLowerCase();
94032
- if (!allowedValues.includes(normalizedValue)) {
94033
- throw new Error(
94034
- `Invalid cloud provider: ${value2}. Allowed values are: ${allowedValues.join(", ")}`
94035
- );
94036
- }
94037
- return normalizedValue;
94038
- };
94039
-
94040
- // ../create-new-packages/headless-command/src/components/ProcessCommand.tsx
94041
- init_esm_shims();
94042
- var import_react155 = __toESM(require_react(), 1);
94043
- var import_variant60 = __toESM(require_lib(), 1);
94044
93997
 
94045
93998
  // ../create-new-packages/headless-command/src/parse-command-options.ts
94046
93999
  init_esm_shims();
@@ -94082,6 +94035,7 @@ async function validatePackageName2(name) {
94082
94035
  // ../create-new-packages/headless-command/src/parse-command-options.ts
94083
94036
  var pureHeadlessTemplates = [
94084
94037
  {
94038
+ name: "commerce",
94085
94039
  title: "Commerce (Wix Stores)",
94086
94040
  subtitle: "Product catalog, checkout, and more",
94087
94041
  siteTemplateId: "e5da13f4-c01e-4b61-a9c7-55dacd961d54",
@@ -94089,6 +94043,7 @@ var pureHeadlessTemplates = [
94089
94043
  vibeCompatible: false
94090
94044
  },
94091
94045
  {
94046
+ name: "scheduler",
94092
94047
  title: "Scheduler (Wix Bookings)",
94093
94048
  subtitle: "Appointment booking and calendar",
94094
94049
  siteTemplateId: "72ade0e3-1871-4c04-ac54-419ca874d9d3",
@@ -94096,6 +94051,7 @@ var pureHeadlessTemplates = [
94096
94051
  vibeCompatible: false
94097
94052
  },
94098
94053
  {
94054
+ name: "registration",
94099
94055
  title: "Registration (Wix Forms)",
94100
94056
  subtitle: "Inputs, dropdowns and field validations",
94101
94057
  siteTemplateId: "e5d63bf1-cd06-48eb-ad77-0da9235adcf1",
@@ -94103,6 +94059,7 @@ var pureHeadlessTemplates = [
94103
94059
  vibeCompatible: false
94104
94060
  },
94105
94061
  {
94062
+ name: "blank",
94106
94063
  title: "Blank",
94107
94064
  subtitle: "Basic Astro project",
94108
94065
  siteTemplateId: "212b41cb-0da6-4401-9c72-7c579e6477a2",
@@ -94143,31 +94100,31 @@ function parseCloudProviders(cloudProvider) {
94143
94100
  return [parseProviderString(cloudProvider)];
94144
94101
  }
94145
94102
  async function parseTemplateOptions2(options) {
94146
- if (options.siteTemplateId) {
94103
+ if (options.siteTemplate) {
94104
+ const appTemplate = headlessTemplates.find(
94105
+ (item) => item.name === options.siteTemplate
94106
+ );
94107
+ if (!appTemplate) {
94108
+ throw new CliError({
94109
+ code: CliErrorCode.CliAppTemplateNotFound({
94110
+ id: options.siteTemplate
94111
+ }),
94112
+ cause: null
94113
+ });
94114
+ }
94147
94115
  if (options.templateRepo && options.templateRepoPath) {
94148
94116
  return TemplateSource2.GitRepo({
94149
- siteTemplateId: options.siteTemplateId,
94117
+ siteTemplateId: appTemplate.siteTemplateId,
94150
94118
  url: options.templateRepo,
94151
94119
  path: options.templateRepoPath
94152
94120
  });
94153
94121
  }
94154
94122
  if (options.templatePath) {
94155
94123
  return TemplateSource2.Local({
94156
- siteTemplateId: options.siteTemplateId,
94124
+ siteTemplateId: appTemplate.siteTemplateId,
94157
94125
  path: options.templatePath
94158
94126
  });
94159
94127
  }
94160
- const appTemplate = headlessTemplates.find(
94161
- (item) => item.siteTemplateId === options.siteTemplateId
94162
- );
94163
- if (!appTemplate) {
94164
- throw new CliError({
94165
- code: CliErrorCode.CliAppTemplateNotFound({
94166
- id: options.siteTemplateId
94167
- }),
94168
- cause: null
94169
- });
94170
- }
94171
94128
  return TemplateSource2.HeadlessApp(appTemplate);
94172
94129
  }
94173
94130
  }
@@ -94236,6 +94193,60 @@ async function parseCommandOptions2(targetParentFolder2, options) {
94236
94193
  };
94237
94194
  }
94238
94195
 
94196
+ // ../create-new-packages/headless-command/src/validations/site-template.ts
94197
+ function validateSiteTemplate(value2) {
94198
+ const normalized = value2.trim().toLowerCase();
94199
+ const match37 = pureHeadlessTemplates.find(
94200
+ (template) => template.name === normalized
94201
+ );
94202
+ if (!match37) {
94203
+ const available = pureHeadlessTemplates.map((template) => template.name).join(", ");
94204
+ throw new InvalidArgumentError(
94205
+ `Unknown template "${value2}". Available templates: ${available}`
94206
+ );
94207
+ }
94208
+ return match37.name;
94209
+ }
94210
+
94211
+ // ../create-new-packages/headless-command/src/validations/git-url.ts
94212
+ init_esm_shims();
94213
+ var import_is_git_url2 = __toESM(require_is_git_url(), 1);
94214
+ function validateGitUrl2(value2) {
94215
+ if ((0, import_is_git_url2.default)(value2)) {
94216
+ return value2;
94217
+ }
94218
+ throw new InvalidArgumentError("Value must be a valid Git URL");
94219
+ }
94220
+
94221
+ // ../create-new-packages/headless-command/src/validations/validate-template-params.ts
94222
+ init_esm_shims();
94223
+ var schema4 = external_exports.string().transform((value2) => JSON.parse(value2)).pipe(external_exports.record(external_exports.unknown()));
94224
+ function validateTemplateParams2(value2) {
94225
+ try {
94226
+ return schema4.parse(value2);
94227
+ } catch {
94228
+ throw new InvalidArgumentError("Value must be a valid JSON object string.");
94229
+ }
94230
+ }
94231
+
94232
+ // ../create-new-packages/headless-command/src/validations/validate-cloud-provider.ts
94233
+ init_esm_shims();
94234
+ var validateCloudProvider = (value2) => {
94235
+ const allowedValues = ["cloudflare", "kubernetes"];
94236
+ const normalizedValue = value2.toLowerCase();
94237
+ if (!allowedValues.includes(normalizedValue)) {
94238
+ throw new Error(
94239
+ `Invalid cloud provider: ${value2}. Allowed values are: ${allowedValues.join(", ")}`
94240
+ );
94241
+ }
94242
+ return normalizedValue;
94243
+ };
94244
+
94245
+ // ../create-new-packages/headless-command/src/components/ProcessCommand.tsx
94246
+ init_esm_shims();
94247
+ var import_react155 = __toESM(require_react(), 1);
94248
+ var import_variant60 = __toESM(require_lib(), 1);
94249
+
94239
94250
  // ../create-new-packages/headless-command/src/components/CreateHeadlessSiteCommand.tsx
94240
94251
  init_esm_shims();
94241
94252
  var import_react154 = __toESM(require_react(), 1);
@@ -95945,6 +95956,12 @@ var getHeadlessCommand = ({
95945
95956
  Arguments: command.args,
95946
95957
  Options: command.opts()
95947
95958
  });
95959
+ if (!process22.stdin.isTTY) {
95960
+ throw new CliError({
95961
+ code: CliErrorCode.NonInteractiveTerminal(),
95962
+ cause: null
95963
+ });
95964
+ }
95948
95965
  const { biLogger, reportCommandStartEvent: reportCommandStartEvent2 } = await createBiLogger3({
95949
95966
  errorReporter: errorReporter2,
95950
95967
  cliVersion,
@@ -95982,9 +95999,9 @@ var getHeadlessCommand = ({
95982
95999
  )
95983
96000
  ).addOption(
95984
96001
  new Option(
95985
- "--site-template-id <site-template-id>",
95986
- "Site Template ID to use for the app creation"
95987
- ).argParser(validateUUID2)
96002
+ "--site-template <site-template>",
96003
+ "Site template to use for the app creation"
96004
+ ).choices(pureHeadlessTemplates.map((template) => template.name)).argParser(validateSiteTemplate)
95988
96005
  ).addOption(
95989
96006
  new Option(
95990
96007
  "--template-repo <template-repo>",
@@ -96032,6 +96049,12 @@ var getHeadlessCommand = ({
96032
96049
  Arguments: command.args,
96033
96050
  Options: command.opts()
96034
96051
  });
96052
+ if (!process22.stdin.isTTY) {
96053
+ throw new CliError({
96054
+ code: CliErrorCode.NonInteractiveTerminal(),
96055
+ cause: null
96056
+ });
96057
+ }
96035
96058
  const { biLogger, reportCommandStartEvent: reportCommandStartEvent2 } = await createBiLogger3({
96036
96059
  errorReporter: errorReporter2,
96037
96060
  cliVersion,
@@ -96070,7 +96093,7 @@ import { randomUUID as randomUUID3 } from "node:crypto";
96070
96093
  var package_default = {
96071
96094
  name: "@wix/create-new",
96072
96095
  description: "General entry point for creating Wix projects",
96073
- version: "0.0.49",
96096
+ version: "0.0.51",
96074
96097
  bin: "bin/index.cjs",
96075
96098
  devDependencies: {
96076
96099
  "@commander-js/extra-typings": "^13.0.0",