@wix/create-app 0.0.97 → 0.0.99

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
@@ -17572,6 +17572,7 @@ var require_re = __commonJS({
17572
17572
  var re = exports.re = [];
17573
17573
  var safeRe = exports.safeRe = [];
17574
17574
  var src = exports.src = [];
17575
+ var safeSrc = exports.safeSrc = [];
17575
17576
  var t3 = exports.t = {};
17576
17577
  var R = 0;
17577
17578
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
@@ -17592,6 +17593,7 @@ var require_re = __commonJS({
17592
17593
  debug3(name, index, value2);
17593
17594
  t3[name] = index;
17594
17595
  src[index] = value2;
17596
+ safeSrc[index] = safe;
17595
17597
  re[index] = new RegExp(value2, isGlobal ? "g" : void 0);
17596
17598
  safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
17597
17599
  };
@@ -17694,7 +17696,7 @@ var require_semver = __commonJS({
17694
17696
  init_esm_shims();
17695
17697
  var debug3 = require_debug2();
17696
17698
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants3();
17697
- var { safeRe: re, t: t3 } = require_re();
17699
+ var { safeRe: re, safeSrc: src, t: t3 } = require_re();
17698
17700
  var parseOptions = require_parse_options();
17699
17701
  var { compareIdentifiers } = require_identifiers();
17700
17702
  var SemVer = class _SemVer {
@@ -17839,7 +17841,8 @@ var require_semver = __commonJS({
17839
17841
  throw new Error("invalid increment argument: identifier is empty");
17840
17842
  }
17841
17843
  if (identifier) {
17842
- const match22 = `-${identifier}`.match(this.options.loose ? re[t3.PRERELEASELOOSE] : re[t3.PRERELEASE]);
17844
+ const r2 = new RegExp(`^${this.options.loose ? src[t3.PRERELEASELOOSE] : src[t3.PRERELEASE]}$`);
17845
+ const match22 = `-${identifier}`.match(r2);
17843
17846
  if (!match22 || match22[1] !== identifier) {
17844
17847
  throw new Error(`invalid identifier: ${identifier}`);
17845
17848
  }
@@ -39207,14 +39210,15 @@ var require_out4 = __commonJS({
39207
39210
  }
39208
39211
  });
39209
39212
 
39210
- // ../../node_modules/ignore/index.js
39213
+ // ../../node_modules/globby/node_modules/ignore/index.js
39211
39214
  var require_ignore = __commonJS({
39212
- "../../node_modules/ignore/index.js"(exports, module2) {
39215
+ "../../node_modules/globby/node_modules/ignore/index.js"(exports, module2) {
39213
39216
  "use strict";
39214
39217
  init_esm_shims();
39215
39218
  function makeArray(subject) {
39216
39219
  return Array.isArray(subject) ? subject : [subject];
39217
39220
  }
39221
+ var UNDEFINED = void 0;
39218
39222
  var EMPTY = "";
39219
39223
  var SPACE = " ";
39220
39224
  var ESCAPE = "\\";
@@ -39224,13 +39228,17 @@ var require_ignore = __commonJS({
39224
39228
  var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
39225
39229
  var REGEX_SPLITALL_CRLF = /\r?\n/g;
39226
39230
  var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/;
39231
+ var REGEX_TEST_TRAILING_SLASH = /\/$/;
39227
39232
  var SLASH = "/";
39228
39233
  var TMP_KEY_IGNORE = "node-ignore";
39229
39234
  if (typeof Symbol !== "undefined") {
39230
39235
  TMP_KEY_IGNORE = Symbol.for("node-ignore");
39231
39236
  }
39232
39237
  var KEY_IGNORE = TMP_KEY_IGNORE;
39233
- var define2 = (object, key, value2) => Object.defineProperty(object, key, { value: value2 });
39238
+ var define2 = (object, key, value2) => {
39239
+ Object.defineProperty(object, key, { value: value2 });
39240
+ return value2;
39241
+ };
39234
39242
  var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
39235
39243
  var RETURN_FALSE = () => false;
39236
39244
  var sanitizeRange = (range) => range.replace(
@@ -39243,7 +39251,7 @@ var require_ignore = __commonJS({
39243
39251
  };
39244
39252
  var REPLACERS = [
39245
39253
  [
39246
- // remove BOM
39254
+ // Remove BOM
39247
39255
  // TODO:
39248
39256
  // Other similar zero-width characters?
39249
39257
  /^\uFEFF/,
@@ -39258,7 +39266,7 @@ var require_ignore = __commonJS({
39258
39266
  /((?:\\\\)*?)(\\?\s+)$/,
39259
39267
  (_2, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)
39260
39268
  ],
39261
- // replace (\ ) with ' '
39269
+ // Replace (\ ) with ' '
39262
39270
  // (\ ) -> ' '
39263
39271
  // (\\ ) -> '\\ '
39264
39272
  // (\\\ ) -> '\\ '
@@ -39387,55 +39395,147 @@ var require_ignore = __commonJS({
39387
39395
  // 'js/' will not match 'a.js'
39388
39396
  // 'js' will match 'a.js' and 'a.js/'
39389
39397
  (match22) => /\/$/.test(match22) ? `${match22}$` : `${match22}(?=$|\\/$)`
39390
- ],
39391
- // trailing wildcard
39392
- [
39393
- /(\^|\\\/)?\\\*$/,
39394
- (_2, p1) => {
39395
- const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
39396
- return `${prefix}(?=$|\\/$)`;
39397
- }
39398
39398
  ]
39399
39399
  ];
39400
- var regexCache = /* @__PURE__ */ Object.create(null);
39401
- var makeRegex = (pattern, ignoreCase) => {
39402
- let source = regexCache[pattern];
39403
- if (!source) {
39404
- source = REPLACERS.reduce(
39405
- (prev, [matcher3, replacer]) => prev.replace(matcher3, replacer.bind(pattern)),
39406
- pattern
39407
- );
39408
- regexCache[pattern] = source;
39400
+ var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/;
39401
+ var MODE_IGNORE = "regex";
39402
+ var MODE_CHECK_IGNORE = "checkRegex";
39403
+ var UNDERSCORE = "_";
39404
+ var TRAILING_WILD_CARD_REPLACERS = {
39405
+ [MODE_IGNORE](_2, p1) {
39406
+ const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
39407
+ return `${prefix}(?=$|\\/$)`;
39408
+ },
39409
+ [MODE_CHECK_IGNORE](_2, p1) {
39410
+ const prefix = p1 ? `${p1}[^/]*` : "[^/]*";
39411
+ return `${prefix}(?=$|\\/$)`;
39409
39412
  }
39410
- return ignoreCase ? new RegExp(source, "i") : new RegExp(source);
39411
39413
  };
39414
+ var makeRegexPrefix = (pattern) => REPLACERS.reduce(
39415
+ (prev, [matcher3, replacer]) => prev.replace(matcher3, replacer.bind(pattern)),
39416
+ pattern
39417
+ );
39412
39418
  var isString3 = (subject) => typeof subject === "string";
39413
39419
  var checkPattern = (pattern) => pattern && isString3(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0;
39414
- var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF);
39420
+ var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean);
39415
39421
  var IgnoreRule = class {
39416
- constructor(origin, pattern, negative, regex2) {
39417
- this.origin = origin;
39422
+ constructor(pattern, mark, body, ignoreCase, negative, prefix) {
39418
39423
  this.pattern = pattern;
39424
+ this.mark = mark;
39419
39425
  this.negative = negative;
39420
- this.regex = regex2;
39426
+ define2(this, "body", body);
39427
+ define2(this, "ignoreCase", ignoreCase);
39428
+ define2(this, "regexPrefix", prefix);
39429
+ }
39430
+ get regex() {
39431
+ const key = UNDERSCORE + MODE_IGNORE;
39432
+ if (this[key]) {
39433
+ return this[key];
39434
+ }
39435
+ return this._make(MODE_IGNORE, key);
39436
+ }
39437
+ get checkRegex() {
39438
+ const key = UNDERSCORE + MODE_CHECK_IGNORE;
39439
+ if (this[key]) {
39440
+ return this[key];
39441
+ }
39442
+ return this._make(MODE_CHECK_IGNORE, key);
39443
+ }
39444
+ _make(mode, key) {
39445
+ const str = this.regexPrefix.replace(
39446
+ REGEX_REPLACE_TRAILING_WILDCARD,
39447
+ // It does not need to bind pattern
39448
+ TRAILING_WILD_CARD_REPLACERS[mode]
39449
+ );
39450
+ const regex2 = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
39451
+ return define2(this, key, regex2);
39421
39452
  }
39422
39453
  };
39423
- var createRule = (pattern, ignoreCase) => {
39424
- const origin = pattern;
39454
+ var createRule = ({
39455
+ pattern,
39456
+ mark
39457
+ }, ignoreCase) => {
39425
39458
  let negative = false;
39426
- if (pattern.indexOf("!") === 0) {
39459
+ let body = pattern;
39460
+ if (body.indexOf("!") === 0) {
39427
39461
  negative = true;
39428
- pattern = pattern.substr(1);
39462
+ body = body.substr(1);
39429
39463
  }
39430
- pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
39431
- const regex2 = makeRegex(pattern, ignoreCase);
39464
+ body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
39465
+ const regexPrefix = makeRegexPrefix(body);
39432
39466
  return new IgnoreRule(
39433
- origin,
39434
39467
  pattern,
39468
+ mark,
39469
+ body,
39470
+ ignoreCase,
39435
39471
  negative,
39436
- regex2
39472
+ regexPrefix
39437
39473
  );
39438
39474
  };
39475
+ var RuleManager = class {
39476
+ constructor(ignoreCase) {
39477
+ this._ignoreCase = ignoreCase;
39478
+ this._rules = [];
39479
+ }
39480
+ _add(pattern) {
39481
+ if (pattern && pattern[KEY_IGNORE]) {
39482
+ this._rules = this._rules.concat(pattern._rules._rules);
39483
+ this._added = true;
39484
+ return;
39485
+ }
39486
+ if (isString3(pattern)) {
39487
+ pattern = {
39488
+ pattern
39489
+ };
39490
+ }
39491
+ if (checkPattern(pattern.pattern)) {
39492
+ const rule = createRule(pattern, this._ignoreCase);
39493
+ this._added = true;
39494
+ this._rules.push(rule);
39495
+ }
39496
+ }
39497
+ // @param {Array<string> | string | Ignore} pattern
39498
+ add(pattern) {
39499
+ this._added = false;
39500
+ makeArray(
39501
+ isString3(pattern) ? splitPattern(pattern) : pattern
39502
+ ).forEach(this._add, this);
39503
+ return this._added;
39504
+ }
39505
+ // Test one single path without recursively checking parent directories
39506
+ //
39507
+ // - checkUnignored `boolean` whether should check if the path is unignored,
39508
+ // setting `checkUnignored` to `false` could reduce additional
39509
+ // path matching.
39510
+ // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
39511
+ // @returns {TestResult} true if a file is ignored
39512
+ test(path8, checkUnignored, mode) {
39513
+ let ignored = false;
39514
+ let unignored = false;
39515
+ let matchedRule;
39516
+ this._rules.forEach((rule) => {
39517
+ const { negative } = rule;
39518
+ if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
39519
+ return;
39520
+ }
39521
+ const matched = rule[mode].test(path8);
39522
+ if (!matched) {
39523
+ return;
39524
+ }
39525
+ ignored = !negative;
39526
+ unignored = negative;
39527
+ matchedRule = negative ? UNDEFINED : rule;
39528
+ });
39529
+ const ret = {
39530
+ ignored,
39531
+ unignored
39532
+ };
39533
+ if (matchedRule) {
39534
+ ret.rule = matchedRule;
39535
+ }
39536
+ return ret;
39537
+ }
39538
+ };
39439
39539
  var throwError = (message, Ctor) => {
39440
39540
  throw new Ctor(message);
39441
39541
  };
@@ -39468,34 +39568,16 @@ var require_ignore = __commonJS({
39468
39568
  allowRelativePaths = false
39469
39569
  } = {}) {
39470
39570
  define2(this, KEY_IGNORE, true);
39471
- this._rules = [];
39472
- this._ignoreCase = ignoreCase;
39473
- this._allowRelativePaths = allowRelativePaths;
39571
+ this._rules = new RuleManager(ignoreCase);
39572
+ this._strictPathCheck = !allowRelativePaths;
39474
39573
  this._initCache();
39475
39574
  }
39476
39575
  _initCache() {
39477
39576
  this._ignoreCache = /* @__PURE__ */ Object.create(null);
39478
39577
  this._testCache = /* @__PURE__ */ Object.create(null);
39479
39578
  }
39480
- _addPattern(pattern) {
39481
- if (pattern && pattern[KEY_IGNORE]) {
39482
- this._rules = this._rules.concat(pattern._rules);
39483
- this._added = true;
39484
- return;
39485
- }
39486
- if (checkPattern(pattern)) {
39487
- const rule = createRule(pattern, this._ignoreCase);
39488
- this._added = true;
39489
- this._rules.push(rule);
39490
- }
39491
- }
39492
- // @param {Array<string> | string | Ignore} pattern
39493
39579
  add(pattern) {
39494
- this._added = false;
39495
- makeArray(
39496
- isString3(pattern) ? splitPattern(pattern) : pattern
39497
- ).forEach(this._addPattern, this);
39498
- if (this._added) {
39580
+ if (this._rules.add(pattern)) {
39499
39581
  this._initCache();
39500
39582
  }
39501
39583
  return this;
@@ -39504,58 +39586,45 @@ var require_ignore = __commonJS({
39504
39586
  addPattern(pattern) {
39505
39587
  return this.add(pattern);
39506
39588
  }
39507
- // | ignored : unignored
39508
- // negative | 0:0 | 0:1 | 1:0 | 1:1
39509
- // -------- | ------- | ------- | ------- | --------
39510
- // 0 | TEST | TEST | SKIP | X
39511
- // 1 | TESTIF | SKIP | TEST | X
39512
- // - SKIP: always skip
39513
- // - TEST: always test
39514
- // - TESTIF: only test if checkUnignored
39515
- // - X: that never happen
39516
- // @param {boolean} whether should check if the path is unignored,
39517
- // setting `checkUnignored` to `false` could reduce additional
39518
- // path matching.
39519
- // @returns {TestResult} true if a file is ignored
39520
- _testOne(path8, checkUnignored) {
39521
- let ignored = false;
39522
- let unignored = false;
39523
- this._rules.forEach((rule) => {
39524
- const { negative } = rule;
39525
- if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
39526
- return;
39527
- }
39528
- const matched = rule.regex.test(path8);
39529
- if (matched) {
39530
- ignored = !negative;
39531
- unignored = negative;
39532
- }
39533
- });
39534
- return {
39535
- ignored,
39536
- unignored
39537
- };
39538
- }
39539
39589
  // @returns {TestResult}
39540
39590
  _test(originalPath, cache3, checkUnignored, slices) {
39541
39591
  const path8 = originalPath && checkPath.convert(originalPath);
39542
39592
  checkPath(
39543
39593
  path8,
39544
39594
  originalPath,
39545
- this._allowRelativePaths ? RETURN_FALSE : throwError
39595
+ this._strictPathCheck ? throwError : RETURN_FALSE
39546
39596
  );
39547
39597
  return this._t(path8, cache3, checkUnignored, slices);
39548
39598
  }
39599
+ checkIgnore(path8) {
39600
+ if (!REGEX_TEST_TRAILING_SLASH.test(path8)) {
39601
+ return this.test(path8);
39602
+ }
39603
+ const slices = path8.split(SLASH).filter(Boolean);
39604
+ slices.pop();
39605
+ if (slices.length) {
39606
+ const parent = this._t(
39607
+ slices.join(SLASH) + SLASH,
39608
+ this._testCache,
39609
+ true,
39610
+ slices
39611
+ );
39612
+ if (parent.ignored) {
39613
+ return parent;
39614
+ }
39615
+ }
39616
+ return this._rules.test(path8, false, MODE_CHECK_IGNORE);
39617
+ }
39549
39618
  _t(path8, cache3, checkUnignored, slices) {
39550
39619
  if (path8 in cache3) {
39551
39620
  return cache3[path8];
39552
39621
  }
39553
39622
  if (!slices) {
39554
- slices = path8.split(SLASH);
39623
+ slices = path8.split(SLASH).filter(Boolean);
39555
39624
  }
39556
39625
  slices.pop();
39557
39626
  if (!slices.length) {
39558
- return cache3[path8] = this._testOne(path8, checkUnignored);
39627
+ return cache3[path8] = this._rules.test(path8, checkUnignored, MODE_IGNORE);
39559
39628
  }
39560
39629
  const parent = this._t(
39561
39630
  slices.join(SLASH) + SLASH,
@@ -39563,7 +39632,7 @@ var require_ignore = __commonJS({
39563
39632
  checkUnignored,
39564
39633
  slices
39565
39634
  );
39566
- return cache3[path8] = parent.ignored ? parent : this._testOne(path8, checkUnignored);
39635
+ return cache3[path8] = parent.ignored ? parent : this._rules.test(path8, checkUnignored, MODE_IGNORE);
39567
39636
  }
39568
39637
  ignores(path8) {
39569
39638
  return this._test(path8, this._ignoreCache, false).ignored;
@@ -39581,18 +39650,18 @@ var require_ignore = __commonJS({
39581
39650
  };
39582
39651
  var factory = (options) => new Ignore(options);
39583
39652
  var isPathValid = (path8) => checkPath(path8 && checkPath.convert(path8), path8, RETURN_FALSE);
39584
- factory.isPathValid = isPathValid;
39585
- factory.default = factory;
39586
- module2.exports = factory;
39587
39653
  if (
39588
39654
  // Detect `process` so that it can run in browsers.
39589
39655
  typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")
39590
39656
  ) {
39591
39657
  const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
39592
39658
  checkPath.convert = makePosix;
39593
- const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
39594
- checkPath.isNotRelative = (path8) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path8) || isNotRelative(path8);
39659
+ const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
39660
+ checkPath.isNotRelative = (path8) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path8) || isNotRelative(path8);
39595
39661
  }
39662
+ module2.exports = factory;
39663
+ factory.default = factory;
39664
+ module2.exports.isPathValid = isPathValid;
39596
39665
  }
39597
39666
  });
39598
39667
 
@@ -40826,8 +40895,8 @@ var require_graceful_fs = __commonJS({
40826
40895
  }
40827
40896
  var fs$copyFile = fs12.copyFile;
40828
40897
  if (fs$copyFile)
40829
- fs12.copyFile = copyFile;
40830
- function copyFile(src, dest, flags, cb) {
40898
+ fs12.copyFile = copyFile2;
40899
+ function copyFile2(src, dest, flags, cb) {
40831
40900
  if (typeof flags === "function") {
40832
40901
  cb = flags;
40833
40902
  flags = 0;
@@ -41606,11 +41675,11 @@ var require_util3 = __commonJS({
41606
41675
  if (files.includes("node_modules") || files.includes("package.json") || files.includes("package.json5") || files.includes("package.yaml") || files.includes("pnpm-workspace.yaml")) {
41607
41676
  return name2;
41608
41677
  }
41609
- const dirname5 = path8.dirname(name2);
41610
- if (dirname5 === name2) {
41678
+ const dirname6 = path8.dirname(name2);
41679
+ if (dirname6 === name2) {
41611
41680
  return original;
41612
41681
  }
41613
- return find(dirname5, original);
41682
+ return find(dirname6, original);
41614
41683
  } catch (error) {
41615
41684
  if (name2 === original) {
41616
41685
  if (error.code === "ENOENT") {
@@ -43051,11 +43120,11 @@ var require_ejs = __commonJS({
43051
43120
  exports.localsName = _DEFAULT_LOCALS_NAME;
43052
43121
  exports.promiseImpl = new Function("return this;")().Promise;
43053
43122
  exports.resolveInclude = function(name, filename, isDir) {
43054
- var dirname5 = path8.dirname;
43055
- var extname = path8.extname;
43123
+ var dirname6 = path8.dirname;
43124
+ var extname2 = path8.extname;
43056
43125
  var resolve5 = path8.resolve;
43057
- var includePath = resolve5(isDir ? filename : dirname5(filename), name);
43058
- var ext = extname(name);
43126
+ var includePath = resolve5(isDir ? filename : dirname6(filename), name);
43127
+ var ext = extname2(name);
43059
43128
  if (!ext) {
43060
43129
  includePath += ".ejs";
43061
43130
  }
@@ -48725,7 +48794,7 @@ var styles_default = styles2;
48725
48794
  // ../../node_modules/ink/build/reconciler.js
48726
48795
  if (process3.env["DEV"] === "true") {
48727
48796
  try {
48728
- await import("./devtools-YPSDP32D.js");
48797
+ await import("./devtools-JB2HYTEA.js");
48729
48798
  } catch (error) {
48730
48799
  if (error.code === "MODULE_NOT_FOUND") {
48731
48800
  console.warn(`
@@ -56679,16 +56748,32 @@ ZodReadonly.create = (type, params) => {
56679
56748
  ...processCreateParams(params)
56680
56749
  });
56681
56750
  };
56682
- function custom(check, params = {}, fatal) {
56751
+ function cleanParams(params, data) {
56752
+ const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
56753
+ const p2 = typeof p === "string" ? { message: p } : p;
56754
+ return p2;
56755
+ }
56756
+ function custom(check, _params = {}, fatal) {
56683
56757
  if (check)
56684
56758
  return ZodAny.create().superRefine((data, ctx) => {
56685
56759
  var _a3, _b;
56686
- if (!check(data)) {
56687
- const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
56688
- const _fatal = (_b = (_a3 = p.fatal) !== null && _a3 !== void 0 ? _a3 : fatal) !== null && _b !== void 0 ? _b : true;
56689
- const p2 = typeof p === "string" ? { message: p } : p;
56690
- ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
56760
+ const r2 = check(data);
56761
+ if (r2 instanceof Promise) {
56762
+ return r2.then((r3) => {
56763
+ var _a4, _b2;
56764
+ if (!r3) {
56765
+ const params = cleanParams(_params, data);
56766
+ const _fatal = (_b2 = (_a4 = params.fatal) !== null && _a4 !== void 0 ? _a4 : fatal) !== null && _b2 !== void 0 ? _b2 : true;
56767
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
56768
+ }
56769
+ });
56691
56770
  }
56771
+ if (!r2) {
56772
+ const params = cleanParams(_params, data);
56773
+ const _fatal = (_b = (_a3 = params.fatal) !== null && _a3 !== void 0 ? _a3 : fatal) !== null && _b !== void 0 ? _b : true;
56774
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
56775
+ }
56776
+ return;
56692
56777
  });
56693
56778
  return ZodAny.create();
56694
56779
  }
@@ -59538,7 +59623,9 @@ var fixComponentProps = (component, index, translation) => {
59538
59623
  function Componentized() {
59539
59624
  return (0, import_react64.createElement)(import_react64.Fragment, null, comp);
59540
59625
  }
59541
- return (0, import_react64.createElement)(Componentized);
59626
+ return (0, import_react64.createElement)(Componentized, {
59627
+ key: componentKey
59628
+ });
59542
59629
  };
59543
59630
  var generateArrayComponents = (components, translation) => components.map((c2, index) => fixComponentProps(c2, index, translation));
59544
59631
  var generateObjectComponents = (components, translation) => {
@@ -63823,6 +63910,7 @@ var postProcessor = {
63823
63910
  }
63824
63911
  };
63825
63912
  var checkedLoadedFor = {};
63913
+ var shouldHandleAsObject = (res) => !isString2(res) && typeof res !== "boolean" && typeof res !== "number";
63826
63914
  var Translator = class _Translator extends EventEmitter {
63827
63915
  constructor(services) {
63828
63916
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -63921,17 +64009,29 @@ var Translator = class _Translator extends EventEmitter {
63921
64009
  let res = resolved?.res;
63922
64010
  const resUsedKey = resolved?.usedKey || key;
63923
64011
  const resExactUsedKey = resolved?.exactUsedKey || key;
63924
- const resType = Object.prototype.toString.apply(res);
63925
64012
  const noObject = ["[object Number]", "[object Function]", "[object RegExp]"];
63926
64013
  const joinArrays = options.joinArrays !== void 0 ? options.joinArrays : this.options.joinArrays;
63927
64014
  const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;
63928
- const handleAsObject = !isString2(res) && typeof res !== "boolean" && typeof res !== "number";
63929
- if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(isString2(joinArrays) && Array.isArray(res))) {
64015
+ const needsPluralHandling = options.count !== void 0 && !isString2(options.count);
64016
+ const hasDefaultValue = _Translator.hasDefaultValue(options);
64017
+ const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, options) : "";
64018
+ const defaultValueSuffixOrdinalFallback = options.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, {
64019
+ ordinal: false
64020
+ }) : "";
64021
+ const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0;
64022
+ const defaultValue = needsZeroSuffixLookup && options[`defaultValue${this.options.pluralSeparator}zero`] || options[`defaultValue${defaultValueSuffix}`] || options[`defaultValue${defaultValueSuffixOrdinalFallback}`] || options.defaultValue;
64023
+ let resForObjHndl = res;
64024
+ if (handleAsObjectInI18nFormat && !res && hasDefaultValue) {
64025
+ resForObjHndl = defaultValue;
64026
+ }
64027
+ const handleAsObject = shouldHandleAsObject(resForObjHndl);
64028
+ const resType = Object.prototype.toString.apply(resForObjHndl);
64029
+ if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && noObject.indexOf(resType) < 0 && !(isString2(joinArrays) && Array.isArray(resForObjHndl))) {
63930
64030
  if (!options.returnObjects && !this.options.returnObjects) {
63931
64031
  if (!this.options.returnedObjectHandler) {
63932
64032
  this.logger.warn("accessing an object - but returnObjects options is not enabled!");
63933
64033
  }
63934
- const r2 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, {
64034
+ const r2 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, resForObjHndl, {
63935
64035
  ...options,
63936
64036
  ns: namespaces
63937
64037
  }) : `key '${key} (${this.language})' returned an object instead of string.`;
@@ -63943,20 +64043,31 @@ var Translator = class _Translator extends EventEmitter {
63943
64043
  return r2;
63944
64044
  }
63945
64045
  if (keySeparator) {
63946
- const resTypeIsArray = Array.isArray(res);
64046
+ const resTypeIsArray = Array.isArray(resForObjHndl);
63947
64047
  const copy2 = resTypeIsArray ? [] : {};
63948
64048
  const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;
63949
- for (const m in res) {
63950
- if (Object.prototype.hasOwnProperty.call(res, m)) {
64049
+ for (const m in resForObjHndl) {
64050
+ if (Object.prototype.hasOwnProperty.call(resForObjHndl, m)) {
63951
64051
  const deepKey = `${newKeyToUse}${keySeparator}${m}`;
63952
- copy2[m] = this.translate(deepKey, {
63953
- ...options,
63954
- ...{
63955
- joinArrays: false,
63956
- ns: namespaces
63957
- }
63958
- });
63959
- if (copy2[m] === deepKey) copy2[m] = res[m];
64052
+ if (hasDefaultValue && !res) {
64053
+ copy2[m] = this.translate(deepKey, {
64054
+ ...options,
64055
+ defaultValue: shouldHandleAsObject(defaultValue) ? defaultValue[m] : void 0,
64056
+ ...{
64057
+ joinArrays: false,
64058
+ ns: namespaces
64059
+ }
64060
+ });
64061
+ } else {
64062
+ copy2[m] = this.translate(deepKey, {
64063
+ ...options,
64064
+ ...{
64065
+ joinArrays: false,
64066
+ ns: namespaces
64067
+ }
64068
+ });
64069
+ }
64070
+ if (copy2[m] === deepKey) copy2[m] = resForObjHndl[m];
63960
64071
  }
63961
64072
  }
63962
64073
  res = copy2;
@@ -63967,14 +64078,6 @@ var Translator = class _Translator extends EventEmitter {
63967
64078
  } else {
63968
64079
  let usedDefault = false;
63969
64080
  let usedKey = false;
63970
- const needsPluralHandling = options.count !== void 0 && !isString2(options.count);
63971
- const hasDefaultValue = _Translator.hasDefaultValue(options);
63972
- const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, options) : "";
63973
- const defaultValueSuffixOrdinalFallback = options.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, {
63974
- ordinal: false
63975
- }) : "";
63976
- const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0;
63977
- const defaultValue = needsZeroSuffixLookup && options[`defaultValue${this.options.pluralSeparator}zero`] || options[`defaultValue${defaultValueSuffix}`] || options[`defaultValue${defaultValueSuffixOrdinalFallback}`] || options.defaultValue;
63978
64081
  if (!this.isValidLookup(res) && hasDefaultValue) {
63979
64082
  usedDefault = true;
63980
64083
  res = defaultValue;
@@ -67085,7 +67188,7 @@ function getErrorComponent(code, cause) {
67085
67188
  return () => /* @__PURE__ */ import_react77.default.createElement(ErrorMessage, { message: "You used invalid API key to log in." });
67086
67189
  },
67087
67190
  SiteConfiguredRequired: () => {
67088
- return () => /* @__PURE__ */ import_react77.default.createElement(ErrorMessage, { message: "You must configure the development site before running this command, or provide a site-id in the command options." });
67191
+ return () => /* @__PURE__ */ import_react77.default.createElement(ErrorMessage, { message: "You must provide a `--site` in the command options." });
67089
67192
  },
67090
67193
  FailedAddingPackageToWorkspace: () => {
67091
67194
  return () => /* @__PURE__ */ import_react77.default.createElement(
@@ -71061,7 +71164,7 @@ function reportCommandStartEvent({
71061
71164
  }
71062
71165
 
71063
71166
  // package.json
71064
- var version = "0.0.97";
71167
+ var version = "0.0.99";
71065
71168
  var package_default = {
71066
71169
  name: "@wix/create-app",
71067
71170
  description: "Create Wix apps",
@@ -71071,7 +71174,7 @@ var package_default = {
71071
71174
  devDependencies: {
71072
71175
  "@commander-js/extra-typings": "^13.0.0",
71073
71176
  "@types/is-git-url": "^1.0.2",
71074
- "@types/lodash": "^4.17.6",
71177
+ "@types/lodash": "^4.17.16",
71075
71178
  "@types/react": "^18.3.3",
71076
71179
  "@types/semver": "^7.5.8",
71077
71180
  "@types/validate-npm-package-name": "^4.0.2",
@@ -71091,7 +71194,7 @@ var package_default = {
71091
71194
  "@wix/package-manager": "workspace:*",
71092
71195
  "@wix/tsup-configs": "workspace:*",
71093
71196
  commander: "^13.0.0",
71094
- globby: "^14.0.2",
71197
+ globby: "^14.1.0",
71095
71198
  "is-git-url": "^1.0.0",
71096
71199
  lodash: "^4.17.21",
71097
71200
  "package-json": "^10.0.1",
@@ -71100,7 +71203,7 @@ var package_default = {
71100
71203
  tempy: "^3.1.0",
71101
71204
  "validate-npm-package-name": "^5.0.1",
71102
71205
  variant: "^3.0.0-dev.27",
71103
- zod: "^3.24.1"
71206
+ zod: "^3.24.2"
71104
71207
  },
71105
71208
  engines: {
71106
71209
  node: ">= 18.16"
@@ -73373,7 +73476,8 @@ var import_fast_glob2 = __toESM(require_out4(), 1);
73373
73476
 
73374
73477
  // ../../node_modules/globby/node_modules/path-type/index.js
73375
73478
  init_esm_shims();
73376
- import fs6, { promises as fsPromises } from "fs";
73479
+ import fs6 from "node:fs";
73480
+ import fsPromises from "node:fs/promises";
73377
73481
  async function isType10(fsStatType, statsMethodName, filePath) {
73378
73482
  if (typeof filePath !== "string") {
73379
73483
  throw new TypeError(`Expected a string, got ${typeof filePath}`);
@@ -73401,19 +73505,23 @@ function isTypeSync(fsStatType, statsMethodName, filePath) {
73401
73505
  throw error;
73402
73506
  }
73403
73507
  }
73404
- var isFile = isType10.bind(null, "stat", "isFile");
73405
- var isDirectory = isType10.bind(null, "stat", "isDirectory");
73406
- var isSymlink = isType10.bind(null, "lstat", "isSymbolicLink");
73407
- var isFileSync = isTypeSync.bind(null, "statSync", "isFile");
73408
- var isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory");
73409
- var isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink");
73508
+ var isFile = isType10.bind(void 0, "stat", "isFile");
73509
+ var isDirectory = isType10.bind(void 0, "stat", "isDirectory");
73510
+ var isSymlink = isType10.bind(void 0, "lstat", "isSymbolicLink");
73511
+ var isFileSync = isTypeSync.bind(void 0, "statSync", "isFile");
73512
+ var isDirectorySync = isTypeSync.bind(void 0, "statSync", "isDirectory");
73513
+ var isSymlinkSync = isTypeSync.bind(void 0, "lstatSync", "isSymbolicLink");
73410
73514
 
73411
- // ../../node_modules/unicorn-magic/node.js
73515
+ // ../../node_modules/globby/node_modules/unicorn-magic/node.js
73412
73516
  init_esm_shims();
73517
+ import { promisify as promisify6 } from "node:util";
73518
+ import { execFile as execFileCallback, execFileSync as execFileSyncOriginal } from "node:child_process";
73413
73519
  import { fileURLToPath as fileURLToPath2 } from "node:url";
73520
+ var execFileOriginal = promisify6(execFileCallback);
73414
73521
  function toPath(urlOrPath) {
73415
73522
  return urlOrPath instanceof URL ? fileURLToPath2(urlOrPath) : urlOrPath;
73416
73523
  }
73524
+ var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
73417
73525
 
73418
73526
  // ../../node_modules/globby/ignore.js
73419
73527
  init_esm_shims();
@@ -80709,8 +80817,8 @@ init_esm_shims();
80709
80817
  init_esm_shims();
80710
80818
  var import_ejs = __toESM(require_ejs(), 1);
80711
80819
  var import_front_matter = __toESM(require_front_matter(), 1);
80712
- import { resolve as resolve4 } from "node:path";
80713
- import { readFile as readFile2 } from "node:fs/promises";
80820
+ import { resolve as resolve4, dirname as dirname5, extname } from "node:path";
80821
+ import { readFile as readFile2, copyFile } from "node:fs/promises";
80714
80822
 
80715
80823
  // ../gena/src/fs-extra.ts
80716
80824
  init_esm_shims();
@@ -80720,12 +80828,28 @@ function getFiles(cwd3) {
80720
80828
 
80721
80829
  // ../gena/src/generator.ts
80722
80830
  var fm = import_front_matter.default;
80831
+ function shouldSkipParsing(file) {
80832
+ return [".png", ".jpg", ".gif"].includes(extname(file).toLowerCase());
80833
+ }
80834
+ async function justCopy({
80835
+ cwd: cwd3,
80836
+ template,
80837
+ path: path8
80838
+ }) {
80839
+ const to = resolve4(cwd3, template);
80840
+ await outputDir(dirname5(to));
80841
+ await copyFile(path8, to);
80842
+ return to;
80843
+ }
80723
80844
  async function generator(opts) {
80724
80845
  const { template: templateRoot, data, cwd: cwd3 } = opts;
80725
80846
  const templates = await getFiles(templateRoot);
80726
- await Promise.all(
80847
+ const generatedFiles = await Promise.all(
80727
80848
  templates.map(async (template) => {
80728
80849
  const path8 = resolve4(templateRoot, template);
80850
+ if (shouldSkipParsing(path8)) {
80851
+ return justCopy({ cwd: cwd3, template, path: path8 });
80852
+ }
80729
80853
  const raw = await readFile2(path8, "utf8");
80730
80854
  const content = (0, import_ejs.render)(raw, data);
80731
80855
  const { attributes, body } = fm(content);
@@ -80734,8 +80858,10 @@ async function generator(opts) {
80734
80858
  }
80735
80859
  const file = resolve4(cwd3, attributes.to ?? template);
80736
80860
  await outputFile(file, body);
80861
+ return file;
80737
80862
  })
80738
80863
  );
80864
+ return generatedFiles.filter((file) => file !== void 0);
80739
80865
  }
80740
80866
 
80741
80867
  // ../gena/src/component-generator.ts
@@ -80761,16 +80887,16 @@ init_esm_shims();
80761
80887
  import fs10 from "node:fs";
80762
80888
  import path7 from "node:path";
80763
80889
  import stream from "node:stream";
80764
- import { promisify as promisify7 } from "node:util";
80890
+ import { promisify as promisify8 } from "node:util";
80765
80891
 
80766
80892
  // ../../node_modules/unique-string/index.js
80767
80893
  init_esm_shims();
80768
80894
 
80769
80895
  // ../../node_modules/crypto-random-string/index.js
80770
80896
  init_esm_shims();
80771
- import { promisify as promisify6 } from "util";
80897
+ import { promisify as promisify7 } from "util";
80772
80898
  import crypto from "crypto";
80773
- var randomBytesAsync = promisify6(crypto.randomBytes);
80899
+ var randomBytesAsync = promisify7(crypto.randomBytes);
80774
80900
  var urlSafeCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split("");
80775
80901
  var numericCharacters = "0123456789".split("");
80776
80902
  var distinguishableCharacters = "CDEHKMPRTUWXY012458".split("");
@@ -80895,7 +81021,7 @@ var temporaryDirectory = await fs9.realpath(os7.tmpdir());
80895
81021
  var temp_dir_default = temporaryDirectory;
80896
81022
 
80897
81023
  // ../../node_modules/tempy/index.js
80898
- var pipeline = promisify7(stream.pipeline);
81024
+ var pipeline = promisify8(stream.pipeline);
80899
81025
  var getPath3 = (prefix = "") => path7.join(temp_dir_default, prefix + uniqueString());
80900
81026
  function temporaryDirectory2({ prefix = "" } = {}) {
80901
81027
  const directory = getPath3(prefix);