@wix/create-app 0.0.172 → 0.0.173

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.
@@ -16,12 +16,12 @@ var require_isType = __commonJS({
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.isTypeImpl = void 0;
18
18
  function isTypeImpl(key) {
19
- function isType3(instanceOrType, type) {
19
+ function isType4(instanceOrType, type) {
20
20
  if (instanceOrType != void 0) {
21
21
  if (typeof instanceOrType === "function" || typeof instanceOrType === "string") {
22
22
  const typeArg = instanceOrType;
23
23
  const typeStr = typeof typeArg === "string" ? typeArg : typeArg.output.type;
24
- return (o) => isType3(o, typeStr);
24
+ return (o) => isType4(o, typeStr);
25
25
  } else {
26
26
  const instance = instanceOrType;
27
27
  const typeStr = typeof type === "string" ? type : type.output.type;
@@ -31,7 +31,7 @@ var require_isType = __commonJS({
31
31
  return false;
32
32
  }
33
33
  }
34
- return { isType: isType3 };
34
+ return { isType: isType4 };
35
35
  }
36
36
  exports.isTypeImpl = isTypeImpl;
37
37
  }
@@ -298,13 +298,13 @@ var require_remote = __commonJS({
298
298
  CompareResult2[CompareResult2["Greater"] = 1] = "Greater";
299
299
  })(CompareResult = exports.CompareResult || (exports.CompareResult = {}));
300
300
  function remoteImpl(key) {
301
- const { isType: isType3 } = (0, isType_1.isTypeImpl)(key);
301
+ const { isType: isType4 } = (0, isType_1.isTypeImpl)(key);
302
302
  const { match } = (0, match_1.matchImpl)(key);
303
303
  const { variantList } = (0, variant_1.variantImpl)(key);
304
304
  function isFunctions(vmod) {
305
305
  const keys = Object.keys(vmod);
306
306
  return keys.reduce((acc, key2) => {
307
- return Object.assign(Object.assign({}, acc), { [key2]: isType3(key2) });
307
+ return Object.assign(Object.assign({}, acc), { [key2]: isType4(key2) });
308
308
  }, {});
309
309
  }
310
310
  function remote(vmod) {
@@ -572,11 +572,11 @@ var require_cosmos = __commonJS({
572
572
  var typed_1 = require_typed();
573
573
  var matcher_1 = require_matcher();
574
574
  function variantCosmos({ key }) {
575
- const { isType: isType3 } = (0, isType_1.isTypeImpl)(key);
575
+ const { isType: isType4 } = (0, isType_1.isTypeImpl)(key);
576
576
  const { flags } = (0, flags_1.flagsImpl)(key);
577
577
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
578
578
  key,
579
- isType: isType3,
579
+ isType: isType4,
580
580
  flags
581
581
  }, (0, isOfVariant_1.isOfVariantImpl)(key)), (0, match_1.matchImpl)(key)), (0, matcher_1.matcherImpl)(key)), (0, remote_1.remoteImpl)(key)), (0, typed_1.typedImpl)(key)), (0, types_1.typesImpl)(key)), (0, variant_1.variantImpl)(key));
582
582
  }
@@ -12769,6 +12769,7 @@ var CliSystemErrorCode = (0, import_variant.variant)({
12769
12769
  FailedToParseNextVersion: (0, import_variant.fields)(),
12770
12770
  FailedToDistributeClientManifestUpdate: {},
12771
12771
  FailedToCreateRoutesWithMetaSiteUrl: {},
12772
+ FailedToUpdateExternalSiteUrl: {},
12772
12773
  FailedToGetGitHubOnboardingStatus: (0, import_variant.fields)(),
12773
12774
  FailedToInitGitHubRepository: (0, import_variant.fields)()
12774
12775
  });
@@ -12926,15 +12927,25 @@ function isCliSystemError(error) {
12926
12927
  return (0, import_variant2.isOfVariant)(error.cliCode, CliSystemErrorCode);
12927
12928
  }
12928
12929
 
12930
+ // ../cli-error/src/get-unknown-failure-message.ts
12931
+ init_esm_shims();
12932
+ var import_variant3 = __toESM(require_lib(), 1);
12933
+ function getUnknownFailureMessage(error) {
12934
+ if (isCliSystemError(error) && (0, import_variant3.isType)(error.cliCode, CliSystemErrorCode.UnknownFailure) && error.cliCode.error instanceof Error && typeof error.cliCode.error.message === "string") {
12935
+ return error.cliCode.error.message;
12936
+ }
12937
+ return error.message;
12938
+ }
12939
+
12929
12940
  // ../cli-error/src/index.ts
12930
12941
  init_esm_shims();
12931
12942
 
12932
12943
  // ../cli-error/src/normalize-error.ts
12933
12944
  init_esm_shims();
12934
- var import_variant3 = __toESM(require_lib(), 1);
12945
+ var import_variant4 = __toESM(require_lib(), 1);
12935
12946
  var import_verror2 = __toESM(require_verror(), 1);
12936
12947
  function getFirstUserError(error) {
12937
- if (isCliError(error) && (0, import_variant3.isOfVariant)(error.cliCode, CliUserErrorCode)) {
12948
+ if (isCliError(error) && (0, import_variant4.isOfVariant)(error.cliCode, CliUserErrorCode)) {
12938
12949
  return error;
12939
12950
  }
12940
12951
  const nestedError = import_verror2.default.cause(error);
@@ -13022,7 +13033,7 @@ async function outputDir(dir) {
13022
13033
 
13023
13034
  // ../package-manager/src/repo-type.ts
13024
13035
  init_esm_shims();
13025
- var import_variant4 = __toESM(require_lib(), 1);
13036
+ var import_variant5 = __toESM(require_lib(), 1);
13026
13037
  import { join as join2 } from "node:path";
13027
13038
 
13028
13039
  // ../package-manager/src/git-service.ts
@@ -14718,10 +14729,10 @@ async function gitClone(url2, path4, branch) {
14718
14729
  }
14719
14730
 
14720
14731
  // ../package-manager/src/repo-type.ts
14721
- var RepoType = (0, import_variant4.variant)({
14732
+ var RepoType = (0, import_variant5.variant)({
14722
14733
  None: {},
14723
- Polyrepo: (0, import_variant4.fields)(),
14724
- Monorepo: (0, import_variant4.fields)()
14734
+ Polyrepo: (0, import_variant5.fields)(),
14735
+ Monorepo: (0, import_variant5.fields)()
14725
14736
  });
14726
14737
  async function getRepoType(targetParentFolder) {
14727
14738
  if (!await isInsideGitRepo(targetParentFolder)) {
@@ -14745,11 +14756,11 @@ async function isUsingWorkspaces(rootDir) {
14745
14756
  init_esm_shims();
14746
14757
  import { env } from "node:process";
14747
14758
  import { join as join4 } from "node:path";
14748
- var import_variant7 = __toESM(require_lib(), 1);
14759
+ var import_variant8 = __toESM(require_lib(), 1);
14749
14760
 
14750
14761
  // ../package-manager/src/adapters/npm.ts
14751
14762
  init_esm_shims();
14752
- var import_variant5 = __toESM(require_lib(), 1);
14763
+ var import_variant6 = __toESM(require_lib(), 1);
14753
14764
  var NPM = class {
14754
14765
  constructor(repoType) {
14755
14766
  this.repoType = repoType;
@@ -14771,7 +14782,7 @@ var NPM = class {
14771
14782
  };
14772
14783
  }
14773
14784
  async setup(_cwd) {
14774
- if ((0, import_variant5.isType)(this.repoType, RepoType.Monorepo)) {
14785
+ if ((0, import_variant6.isType)(this.repoType, RepoType.Monorepo)) {
14775
14786
  throw new CliError({
14776
14787
  code: CliErrorCode.UnsupportedPackageManagerWorkspaces({
14777
14788
  packageManagerName: this.name
@@ -14817,7 +14828,7 @@ var NPM = class {
14817
14828
 
14818
14829
  // ../package-manager/src/adapters/yarn.ts
14819
14830
  init_esm_shims();
14820
- var import_variant6 = __toESM(require_lib(), 1);
14831
+ var import_variant7 = __toESM(require_lib(), 1);
14821
14832
  import { join as join3, relative as relative2 } from "node:path";
14822
14833
  import { EOL as EOL2 } from "node:os";
14823
14834
  import { writeFile as writeFile2 } from "node:fs/promises";
@@ -14846,7 +14857,7 @@ var Yarn = class {
14846
14857
  };
14847
14858
  }
14848
14859
  async setup(packageFolder) {
14849
- return (0, import_variant6.matcher)(this.repoType).when(["None", "Polyrepo"], async () => {
14860
+ return (0, import_variant7.matcher)(this.repoType).when(["None", "Polyrepo"], async () => {
14850
14861
  if (this.name === "yarn-berry") {
14851
14862
  await writeFile2(join3(packageFolder, "yarn.lock"), "");
14852
14863
  }
@@ -14985,7 +14996,7 @@ async function getPackageManagerName(repoType) {
14985
14996
  cause: null
14986
14997
  });
14987
14998
  };
14988
- return (0, import_variant7.matcher)(repoType).when(RepoType.None, getByEnv).when(
14999
+ return (0, import_variant8.matcher)(repoType).when(RepoType.None, getByEnv).when(
14989
15000
  [RepoType.Polyrepo, RepoType.Monorepo],
14990
15001
  async ({ rootDir }) => {
14991
15002
  const [hasYarnRc, hasYarnLock, hasPackageLock] = await Promise.all([
@@ -15199,7 +15210,7 @@ var import_fast_glob2 = __toESM(require_out4(), 1);
15199
15210
  init_esm_shims();
15200
15211
  import fs from "node:fs";
15201
15212
  import fsPromises from "node:fs/promises";
15202
- async function isType2(fsStatType, statsMethodName, filePath) {
15213
+ async function isType3(fsStatType, statsMethodName, filePath) {
15203
15214
  if (typeof filePath !== "string") {
15204
15215
  throw new TypeError(`Expected a string, got ${typeof filePath}`);
15205
15216
  }
@@ -15226,9 +15237,9 @@ function isTypeSync(fsStatType, statsMethodName, filePath) {
15226
15237
  throw error;
15227
15238
  }
15228
15239
  }
15229
- var isFile = isType2.bind(void 0, "stat", "isFile");
15230
- var isDirectory = isType2.bind(void 0, "stat", "isDirectory");
15231
- var isSymlink = isType2.bind(void 0, "lstat", "isSymbolicLink");
15240
+ var isFile = isType3.bind(void 0, "stat", "isFile");
15241
+ var isDirectory = isType3.bind(void 0, "stat", "isDirectory");
15242
+ var isSymlink = isType3.bind(void 0, "lstat", "isSymbolicLink");
15232
15243
  var isFileSync = isTypeSync.bind(void 0, "statSync", "isFile");
15233
15244
  var isDirectorySync = isTypeSync.bind(void 0, "statSync", "isDirectory");
15234
15245
  var isSymlinkSync = isTypeSync.bind(void 0, "lstatSync", "isSymbolicLink");
@@ -15545,6 +15556,7 @@ export {
15545
15556
  isCliError,
15546
15557
  isCliSystemError,
15547
15558
  normalizeError,
15559
+ getUnknownFailureMessage,
15548
15560
  writeJson,
15549
15561
  readJson,
15550
15562
  pathExists,
@@ -15616,4 +15628,4 @@ queue-microtask/index.js:
15616
15628
  run-parallel/index.js:
15617
15629
  (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
15618
15630
  */
15619
- //# sourceMappingURL=chunk-KLP34UUN.js.map
15631
+ //# sourceMappingURL=chunk-6UZL2DGQ.js.map