@arcgis/create 5.1.0-next.50 → 5.1.0-next.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/init.js +38 -38
  2. package/package.json +1 -1
package/dist/init.js CHANGED
@@ -2612,7 +2612,7 @@ const Ga = /* @__PURE__ */ Mt(Ba), {
2612
2612
  Argument: Gf,
2613
2613
  Option: qf,
2614
2614
  Help: jf
2615
- } = Ga, ja = "5.1.0-next.50", Ua = {
2615
+ } = Ga, ja = "5.1.0-next.52", Ua = {
2616
2616
  version: ja
2617
2617
  }, D = {
2618
2618
  react: "react",
@@ -3738,12 +3738,12 @@ function ye(e, h = globalThis.Deno ? globalThis.Deno.args : le.argv) {
3738
3738
  const m = e.startsWith("-") ? "" : e.length === 1 ? "-" : "--", g = h.indexOf(m + e), f = h.indexOf("--");
3739
3739
  return g !== -1 && (f === -1 || g < f);
3740
3740
  }
3741
- const { env: Q } = le;
3741
+ const { env: X } = le;
3742
3742
  let xt;
3743
3743
  ye("no-color") || ye("no-colors") || ye("color=false") || ye("color=never") ? xt = 0 : (ye("color") || ye("colors") || ye("color=true") || ye("color=always")) && (xt = 1);
3744
3744
  function Xl() {
3745
- if ("FORCE_COLOR" in Q)
3746
- return Q.FORCE_COLOR === "true" ? 1 : Q.FORCE_COLOR === "false" ? 0 : Q.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(Q.FORCE_COLOR, 10), 3);
3745
+ if ("FORCE_COLOR" in X)
3746
+ return X.FORCE_COLOR === "true" ? 1 : X.FORCE_COLOR === "false" ? 0 : X.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(X.FORCE_COLOR, 10), 3);
3747
3747
  }
3748
3748
  function Ql(e) {
3749
3749
  return e === 0 ? !1 : {
@@ -3765,33 +3765,33 @@ function Zl(e, { streamIsTTY: h, sniffFlags: m = !0 } = {}) {
3765
3765
  if (ye("color=256"))
3766
3766
  return 2;
3767
3767
  }
3768
- if ("TF_BUILD" in Q && "AGENT_NAME" in Q)
3768
+ if ("TF_BUILD" in X && "AGENT_NAME" in X)
3769
3769
  return 1;
3770
3770
  if (e && !h && f === void 0)
3771
3771
  return 0;
3772
3772
  const i = f || 0;
3773
- if (Q.TERM === "dumb")
3773
+ if (X.TERM === "dumb")
3774
3774
  return i;
3775
3775
  if (le.platform === "win32") {
3776
3776
  const s = _a.release().split(".");
3777
3777
  return Number(s[0]) >= 10 && Number(s[2]) >= 10586 ? Number(s[2]) >= 14931 ? 3 : 2 : 1;
3778
3778
  }
3779
- if ("CI" in Q)
3780
- return ["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((s) => s in Q) ? 3 : ["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((s) => s in Q) || Q.CI_NAME === "codeship" ? 1 : i;
3781
- if ("TEAMCITY_VERSION" in Q)
3782
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Q.TEAMCITY_VERSION) ? 1 : 0;
3783
- if (Q.COLORTERM === "truecolor" || Q.TERM === "xterm-kitty")
3779
+ if ("CI" in X)
3780
+ return ["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((s) => s in X) ? 3 : ["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((s) => s in X) || X.CI_NAME === "codeship" ? 1 : i;
3781
+ if ("TEAMCITY_VERSION" in X)
3782
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION) ? 1 : 0;
3783
+ if (X.COLORTERM === "truecolor" || X.TERM === "xterm-kitty" || X.TERM === "xterm-ghostty" || X.TERM === "wezterm")
3784
3784
  return 3;
3785
- if ("TERM_PROGRAM" in Q) {
3786
- const s = Number.parseInt((Q.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
3787
- switch (Q.TERM_PROGRAM) {
3785
+ if ("TERM_PROGRAM" in X) {
3786
+ const s = Number.parseInt((X.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
3787
+ switch (X.TERM_PROGRAM) {
3788
3788
  case "iTerm.app":
3789
3789
  return s >= 3 ? 3 : 2;
3790
3790
  case "Apple_Terminal":
3791
3791
  return 2;
3792
3792
  }
3793
3793
  }
3794
- return /-256(color)?$/i.test(Q.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Q.TERM) || "COLORTERM" in Q ? 1 : i;
3794
+ return /-256(color)?$/i.test(X.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM) || "COLORTERM" in X ? 1 : i;
3795
3795
  }
3796
3796
  function ws(e, h = {}) {
3797
3797
  const m = Zl(e, {
@@ -12685,7 +12685,7 @@ function Zu() {
12685
12685
  return W.Composer = e.Composer, W.Document = h.Document, W.Schema = m.Schema, W.YAMLError = g.YAMLError, W.YAMLParseError = g.YAMLParseError, W.YAMLWarning = g.YAMLWarning, W.Alias = f.Alias, W.isAlias = i.isAlias, W.isCollection = i.isCollection, W.isDocument = i.isDocument, W.isMap = i.isMap, W.isNode = i.isNode, W.isPair = i.isPair, W.isScalar = i.isScalar, W.isSeq = i.isSeq, W.Pair = s.Pair, W.Scalar = a.Scalar, W.YAMLMap = o.YAMLMap, W.YAMLSeq = p.YAMLSeq, W.CST = n, W.Lexer = t.Lexer, W.LineCounter = l.LineCounter, W.Parser = c.Parser, W.parse = u.parse, W.parseAllDocuments = u.parseAllDocuments, W.parseDocument = u.parseDocument, W.stringify = u.stringify, W.visit = d.visit, W.visitAsync = d.visitAsync, W;
12686
12686
  }
12687
12687
  var ef = Zu();
12688
- const X = {
12688
+ const Q = {
12689
12689
  missingGit: "Git is required to fetch templates, but it is not installed or not available on PATH. Please install Git and try again.",
12690
12690
  missingTemplate: [
12691
12691
  `We couldn't find the selected template in the source repository.
@@ -12721,15 +12721,15 @@ function go(e) {
12721
12721
  }
12722
12722
  }
12723
12723
  const h = [
12724
- X.missingGit,
12725
- X.missingTemplate,
12726
- X.missingHost,
12727
- X.invalidCodeSampleTemplate,
12728
- X.generic
12724
+ Q.missingGit,
12725
+ Q.missingTemplate,
12726
+ Q.missingHost,
12727
+ Q.invalidCodeSampleTemplate,
12728
+ Q.generic
12729
12729
  ], m = ['Directory "', "Invalid domain", "Invalid template", "Invalid option", 'Template "'], g = (f) => h.includes(f) || m.some((i) => f.startsWith(i));
12730
12730
  if (e instanceof Error) {
12731
12731
  const f = e.message || "Unknown error";
12732
- return g(f) ? f : X.generic;
12732
+ return g(f) ? f : Q.generic;
12733
12733
  }
12734
12734
  if (typeof e == "string")
12735
12735
  return e;
@@ -12760,7 +12760,7 @@ async function da() {
12760
12760
  try {
12761
12761
  await be("git --version");
12762
12762
  } catch {
12763
- throw new Error(X.missingGit);
12763
+ throw new Error(Q.missingGit);
12764
12764
  }
12765
12765
  }
12766
12766
  async function nf(e, h, m, g = Tn) {
@@ -12769,7 +12769,7 @@ async function nf(e, h, m, g = Tn) {
12769
12769
  try {
12770
12770
  await ne.mkdir(e);
12771
12771
  } catch (i) {
12772
- throw zt(i) && i.code === "EEXIST" ? new Error(X.folderAlreadyExists(e)) : new Error(X.generic);
12772
+ throw zt(i) && i.code === "EEXIST" ? new Error(Q.folderAlreadyExists(e)) : new Error(Q.generic);
12773
12773
  }
12774
12774
  try {
12775
12775
  Ae.chdir(e), await be("git init"), await be(`git remote add origin ${h}`), await be("git config core.sparseCheckout true"), await be(`git sparse-checkout set --no-cone ${m}/*`), await be(`git pull origin ${g}`);
@@ -12777,7 +12777,7 @@ async function nf(e, h, m, g = Tn) {
12777
12777
  if (!(await ne.stat(m)).isDirectory())
12778
12778
  throw new Error();
12779
12779
  } catch {
12780
- throw new Error(X.missingTemplate);
12780
+ throw new Error(Q.missingTemplate);
12781
12781
  }
12782
12782
  await ma(m, "."), await ne.rm(".git", { recursive: !0, force: !0 });
12783
12783
  } finally {
@@ -12791,7 +12791,7 @@ async function sf(e, h, m, g = Tn) {
12791
12791
  try {
12792
12792
  await ne.mkdir(e);
12793
12793
  } catch (s) {
12794
- throw zt(s) && s.code === "EEXIST" ? new Error(X.folderAlreadyExists(e)) : new Error(X.generic);
12794
+ throw zt(s) && s.code === "EEXIST" ? new Error(Q.folderAlreadyExists(e)) : new Error(Q.generic);
12795
12795
  }
12796
12796
  try {
12797
12797
  Ae.chdir(e), await be("git init"), await be(`git remote add origin ${h}`), await be("git config core.sparseCheckout true"), await be(`git sparse-checkout set --no-cone ${m}/* pnpm-workspace.yaml`), await be(`git pull origin ${g}`);
@@ -12799,7 +12799,7 @@ async function sf(e, h, m, g = Tn) {
12799
12799
  if (!(await ne.stat(m)).isDirectory())
12800
12800
  throw new Error();
12801
12801
  } catch {
12802
- throw new Error(X.missingTemplate);
12802
+ throw new Error(Q.missingTemplate);
12803
12803
  }
12804
12804
  const s = await ne.readFile("pnpm-workspace.yaml", "utf-8");
12805
12805
  i = ef.parse(s).catalog ?? {}, await ma(m, "."), await ne.rm(".git", { recursive: !0, force: !0 }), await ne.rm("pnpm-workspace.yaml", { force: !0 });
@@ -12821,7 +12821,7 @@ function rf(e, h) {
12821
12821
  async function ma(e, h) {
12822
12822
  if (!(e === "." || e === "" || ["./", "/"].includes(e.split("/")[0]))) {
12823
12823
  if (Je.isAbsolute(e))
12824
- throw new Error(X.generic);
12824
+ throw new Error(Q.generic);
12825
12825
  try {
12826
12826
  const m = await ne.readdir(e);
12827
12827
  await Promise.all(
@@ -12833,7 +12833,7 @@ async function ma(e, h) {
12833
12833
  const g = e.split("/")[0];
12834
12834
  await ne.rm(g, { recursive: !0, force: !0 });
12835
12835
  } catch (m) {
12836
- throw zt(m) && m.code === "ENOENT" ? new Error(X.missingTemplate) : m;
12836
+ throw zt(m) && m.code === "ENOENT" ? new Error(Q.missingTemplate) : m;
12837
12837
  }
12838
12838
  }
12839
12839
  }
@@ -12860,14 +12860,14 @@ const lf = (e) => {
12860
12860
  break;
12861
12861
  case "domain": {
12862
12862
  if (!e.domain || !Object.values(In).includes(e.domain))
12863
- throw new Error(X.invalidDomain(e.domain));
12863
+ throw new Error(Q.invalidDomain(e.domain));
12864
12864
  h.domain = e.domain;
12865
12865
  break;
12866
12866
  }
12867
12867
  case "template": {
12868
12868
  const f = e.template, i = f?.toLowerCase();
12869
12869
  if (!i || !Object.values(D).includes(i))
12870
- throw new Error(X.invalidTemplate(f));
12870
+ throw new Error(Q.invalidTemplate(f));
12871
12871
  h.template = i;
12872
12872
  break;
12873
12873
  }
@@ -12879,7 +12879,7 @@ const lf = (e) => {
12879
12879
  break;
12880
12880
  default: {
12881
12881
  const f = g;
12882
- throw Error(X.invalidOption(String(f)));
12882
+ throw Error(Q.invalidOption(String(f)));
12883
12883
  }
12884
12884
  }
12885
12885
  }), h;
@@ -12925,10 +12925,10 @@ function ff(e, h) {
12925
12925
  function hf(e, h) {
12926
12926
  const m = Ha[e];
12927
12927
  if (h === D.luminaComponents)
12928
- throw new Error(X.templateNotAvailable(h, e));
12928
+ throw new Error(Q.templateNotAvailable(h, e));
12929
12929
  const g = m[h];
12930
12930
  if (!g)
12931
- throw new Error(X.templateNotAvailable(h, e));
12931
+ throw new Error(Q.templateNotAvailable(h, e));
12932
12932
  return g;
12933
12933
  }
12934
12934
  async function ba(e, h, m) {
@@ -12959,7 +12959,7 @@ async function pf(e) {
12959
12959
  );
12960
12960
  if (h.name = m.projectName, process.env.NODE_ENV !== "test") {
12961
12961
  try {
12962
- throw await ne.stat(m.projectName), new Error(X.folderAlreadyExists(m.projectName));
12962
+ throw await ne.stat(m.projectName), new Error(Q.folderAlreadyExists(m.projectName));
12963
12963
  } catch (a) {
12964
12964
  if (!(a && typeof a == "object" && "code" in a && a.code === "ENOENT"))
12965
12965
  throw a;
@@ -13002,14 +13002,14 @@ async function df(e) {
13002
13002
  const { template: h, branch: m = Tn } = e, g = Qn(e);
13003
13003
  try {
13004
13004
  if (h !== D.luminaComponents)
13005
- throw new Error(X.invalidCodeSampleTemplate);
13005
+ throw new Error(Q.invalidCodeSampleTemplate);
13006
13006
  if (!e.host)
13007
- throw new Error(X.missingHost);
13007
+ throw new Error(Q.missingHost);
13008
13008
  Mo();
13009
13009
  const f = e.name ?? await Do();
13010
13010
  if (Oo(f) && (xo("Operation cancelled."), process.exit(0)), g.name = f, process.env.NODE_ENV !== "test") {
13011
13011
  try {
13012
- throw await ne.stat(f), new Error(X.folderAlreadyExists(f));
13012
+ throw await ne.stat(f), new Error(Q.folderAlreadyExists(f));
13013
13013
  } catch (y) {
13014
13014
  if (!(y && typeof y == "object" && "code" in y && y.code === "ENOENT"))
13015
13015
  throw y;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/create",
3
- "version": "5.1.0-next.50",
3
+ "version": "5.1.0-next.52",
4
4
  "description": "The ArcGIS Maps SDK for JavaScript provides this CLI tool to streamline the process of creating a new web mapping application.",
5
5
  "keywords": [
6
6
  "ArcGIS",