@arcgis/lumina-compiler 4.33.0-next.135 → 4.33.0-next.136

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/index.js +43 -40
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { nodeExternals as ms } from "rollup-plugin-node-externals";
2
- import { stringToStartsWithGlob as Wt, path as u, toSystemPathSeparators as Y, retrievePackageJson as R, fetchPackageLocation as Be, asyncRetrievePackageJson as _e, existsAsync as z, findPath as fs, toPosixPathSeparators as Ie, isPosix as Ji, getCwd as Ki } from "@arcgis/components-build-utils";
2
+ import { stringToStartsWithGlob as Wt, path as u, toSystemPathSeparators as Y, retrievePackageJson as R, fetchPackageLocation as Be, asyncRetrievePackageJson as _e, existsAsync as U, findPath as fs, toPosixPathSeparators as Ie, isPosix as Ji, getCwd as Ki } from "@arcgis/components-build-utils";
3
3
  import ys from "vite-plugin-dts";
4
4
  import o from "typescript";
5
5
  import { f as b, l as C } from "./logger-KpGU2b3R.js";
6
6
  import { getMemberName as X, apiMemberToSynthesizedComments as V, globalPackageIdentifier as Wi, setApiDocFromJsDoc as ue, ApiExtractor as hs, hasIgnoredModifier as gs, symbolToDocs as Bt, setDefaultFromInitializer as _t, multipleJsDocTags as vs, findDecorator as Ht, isApiMethod as Ss, isApiProperty as ws } from "@arcgis/api-extractor";
7
7
  import { isNotUndefined as j, mappedFind as ye, camelToKebab as bt, kebabToPascal as bs, uncapitalize as ut, identity as Bi, Deferred as Ts, getPreamble as Es, capitalize as Cs } from "@arcgis/components-utils";
8
- import { readdir as He, readFile as J, rm as $s, mkdir as _, cp as Ps, writeFile as F, copyFile as xs } from "node:fs/promises";
8
+ import { readdir as He, readFile as J, rm as $s, mkdir as z, cp as Ps, writeFile as F, copyFile as xs } from "node:fs/promises";
9
9
  import { lazyMetaSubItemJoiner as As, lazyMetaItemJoiner as et, lazyMetaGroupJoiner as ks, propertyFlagAttribute as Ut, propertyFlagReflect as Is, propertyFlagBoolean as Ls, propertyFlagNumber as Fs, propertyFlagState as Ns, propertyFlagReadOnly as Ds, propertyFlagNoAccessor as js } from "@arcgis/lumina/config";
10
10
  import { build as Rs } from "esbuild";
11
11
  import { glob as Ms } from "glob";
@@ -3068,7 +3068,7 @@ const fa = /* @__PURE__ */ new Set([
3068
3068
  let ht, gt, ve;
3069
3069
  async function bn(e, t) {
3070
3070
  const i = await Be(e, t), n = await _e(i), s = "exports" in n, r = wa.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
3071
- if (a ? await z(c) : !1) {
3071
+ if (a ? await U(c) : !1) {
3072
3072
  const y = await J(c, "utf8"), h = ya(y, "bootstrapLazy("), g = y.indexOf(", options", h), v = y.slice(h, g), S = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
3073
3073
  try {
3074
3074
  const E = JSON.parse(S), $ = va(E, { packageName: e, getImportPath: r });
@@ -3096,7 +3096,7 @@ Error: ${String(E)}`);
3096
3096
  return { type: "unknown", packageName: e, components: g };
3097
3097
  }
3098
3098
  const m = u.join(i, "dist/components");
3099
- if (await z(m)) {
3099
+ if (await U(m)) {
3100
3100
  const y = await Sa(m, {
3101
3101
  packageName: e,
3102
3102
  getImportPath: r
@@ -3852,7 +3852,7 @@ Found ${I.getText(e.sourceFile)}`
3852
3852
  return N === "key" ? (m = typeof D[0] == "object" && !Fn(P, e) ? D[0] : void 0, M.some(Ja) ? M : []) : N === "directives" || N === "ref" || T === "deferLoad" ? (y ||= N === "deferLoad", f.push(
3853
3853
  ...M,
3854
3854
  ...D.flatMap(
3855
- (U, K) => typeof U == "string" || K === 0 || typeof D[K - 1] == "string" ? U : [" ", U]
3855
+ (H, K) => typeof H == "string" || K === 0 || typeof D[K - 1] == "string" ? H : [" ", H]
3856
3856
  )
3857
3857
  ), []) : [...M, ...D];
3858
3858
  });
@@ -4722,7 +4722,7 @@ function Dc(e, t) {
4722
4722
  }
4723
4723
  async function jc(e, t, i) {
4724
4724
  const n = u.resolve(e.dir.root, t);
4725
- await z(n) && await $s(n, { recursive: !0, force: !0 }), await _(n, { recursive: !0 }), await Ps(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
4725
+ await U(n) && await $s(n, { recursive: !0, force: !0 }), await z(n, { recursive: !0 }), await Ps(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
4726
4726
  const s = [
4727
4727
  "index.html",
4728
4728
  ...await Ms("**/*.html", {
@@ -4746,7 +4746,7 @@ async function jc(e, t, i) {
4746
4746
  await Promise.all(
4747
4747
  s.map(async (d, p) => {
4748
4748
  const f = p === 0 ? d : u.join(r, d), y = u.join(e.dir.root, f), h = u.join(n, f);
4749
- await _(u.dirname(h), { recursive: !0 });
4749
+ await z(u.dirname(h), { recursive: !0 });
4750
4750
  const g = await J(y, "utf-8"), v = ee(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
4751
4751
  `;
4752
4752
  let E = g.indexOf("<style>");
@@ -4770,7 +4770,7 @@ const _n = /* @__PURE__ */ new Set([
4770
4770
  "collection",
4771
4771
  "extras",
4772
4772
  "support"
4773
- ]), H = "@arcgis/lumina:buildCdn", jt = "cdn", Hn = "index", be = "main";
4773
+ ]), _ = "@arcgis/lumina:buildCdn", jt = "cdn", Hn = "index", be = "main";
4774
4774
  function Rc(e) {
4775
4775
  const { skip: t = !1, namespace: i, esbuildOptions: n = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination, r = i !== void 0;
4776
4776
  if (r) {
@@ -4789,24 +4789,24 @@ function Rc(e) {
4789
4789
  {
4790
4790
  type: "dynamic",
4791
4791
  source: () => _o(e),
4792
- destination: r ? `../${a}.css` : `../../${be}.css`
4792
+ destination: `../${r ? a : be}.css`
4793
4793
  }
4794
4794
  ]), !t)
4795
4795
  return {
4796
- name: H,
4796
+ name: _,
4797
4797
  async writeBundle() {
4798
4798
  if (e.isInStorybook)
4799
4799
  return;
4800
- const c = Qe && R().name !== "@arcgis/embeddable-components", l = Date.now(), d = _(e.dir.distCdn, { recursive: !0 }), p = Array.isArray(n.entryPoints) ? n.entryPoints.map((y) => typeof y == "string" ? { in: y, out: "" } : y) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([y, h]) => ({ in: h, out: y })) : [], m = await Mc(e, a, n, p, c);
4801
- await d, await Oc(
4802
- m,
4800
+ const c = Qe && R().name !== "@arcgis/embeddable-components", l = Date.now(), d = Array.isArray(n.entryPoints) ? n.entryPoints.map((f) => typeof f == "string" ? { in: f, out: "" } : f) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([f, y]) => ({ in: y, out: f })) : [], p = await Mc(e, a, n, d, c);
4801
+ await Oc(
4802
+ p,
4803
4803
  e.dir.distCdn,
4804
4804
  r ? `${a}.esm` : a,
4805
- p,
4805
+ d,
4806
4806
  c
4807
4807
  );
4808
- const f = Date.now();
4809
- C.info(H, `CDN was built in ${f - l}ms`), s && await jc(e, s, `${r ? `${a}.esm` : a}.js`);
4808
+ const m = Date.now();
4809
+ C.info(_, `CDN was built in ${m - l}ms`), s && await jc(e, s, `${r ? `${a}.esm` : a}.js`);
4810
4810
  }
4811
4811
  };
4812
4812
  }
@@ -4815,14 +4815,14 @@ async function Mc(e, t, i, n, s) {
4815
4815
  if (i.minify && s)
4816
4816
  throw Error(
4817
4817
  b(
4818
- H,
4818
+ _,
4819
4819
  "Unminified CDN build is not yet supported - open a feature request with Lumina maintainers if it is needed"
4820
4820
  )
4821
4821
  );
4822
4822
  if (i.sourcemap && s)
4823
4823
  throw Error(
4824
4824
  b(
4825
- H,
4825
+ _,
4826
4826
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
4827
4827
  )
4828
4828
  );
@@ -4944,11 +4944,11 @@ function Kc(e, t) {
4944
4944
  const s = [];
4945
4945
  for (const r of t) {
4946
4946
  if (r.in.includes("*")) {
4947
- C.warn(H, `$arcgis.import does not support wildcard imports, so ${r.in} will be ignored.`);
4947
+ C.warn(_, `$arcgis.import does not support wildcard imports, so ${r.in} will be ignored.`);
4948
4948
  continue;
4949
4949
  }
4950
4950
  if (r.out.startsWith(".") || r.out.startsWith("/"))
4951
- throw Error(b(H, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4951
+ throw Error(b(_, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4952
4952
  s.push(r.out);
4953
4953
  }
4954
4954
  i += `i=(a.importMap??={}).imports??={};"${s.join(",")}".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));`;
@@ -4978,12 +4978,12 @@ function Un(e, t) {
4978
4978
  let c = 0;
4979
4979
  const l = e.code.matchAll(Wc);
4980
4980
  for (const w of l) {
4981
- const [T, L, N, D, M] = w, U = M.startsWith(We);
4981
+ const [T, L, N, D, M] = w, H = M.startsWith(We);
4982
4982
  if (c !== 0 && c !== w.index) {
4983
4983
  const K = e.code.slice(c, w.index);
4984
4984
  s.push(K), a.push([c, K.length, 0, ""]);
4985
4985
  }
4986
- if (c = w.index + T.length, U)
4986
+ if (c = w.index + T.length, H)
4987
4987
  a.push([w.index, T.length, 0, ""]), n.push(`"${qn(M.slice(We.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? N ?? D ?? "");
4988
4988
  else {
4989
4989
  const K = zn(M, t), G = K?.isAsync === !0;
@@ -5003,7 +5003,7 @@ function Un(e, t) {
5003
5003
  if (G)
5004
5004
  throw Error(
5005
5005
  b(
5006
- H,
5006
+ _,
5007
5007
  `Expected local import specifiers to use only named or side-effect import syntax. Found ${T}`
5008
5008
  )
5009
5009
  );
@@ -5019,12 +5019,12 @@ function Un(e, t) {
5019
5019
  let p = e.code.slice(0, c);
5020
5020
  for (let w = a.length - 1; w >= 0; w--) {
5021
5021
  const [T, L, N, D] = a[w];
5022
- let M = L, U = "";
5022
+ let M = L, H = "";
5023
5023
  if (L === 0) {
5024
5024
  const G = d();
5025
- n.push(G), U = ` ${G} from`, D !== "" ? (M = N + 4, i.push(D)) : i.push("");
5025
+ n.push(G), H = ` ${G} from`, D !== "" ? (M = N + 4, i.push(D)) : i.push("");
5026
5026
  }
5027
- p = p.slice(0, T) + U + p.slice(T + M);
5027
+ p = p.slice(0, T) + H + p.slice(T + M);
5028
5028
  }
5029
5029
  const m = Bc.exec(e.code), f = m?.index ?? e.code.length;
5030
5030
  let y = "";
@@ -5052,9 +5052,9 @@ function zn(e, t) {
5052
5052
  return;
5053
5053
  const i = e.slice(2), n = t.get(i);
5054
5054
  if (n === void 0)
5055
- throw Error(b(H, `Failed to find the ${e} module`));
5055
+ throw Error(b(_, `Failed to find the ${e} module`));
5056
5056
  if (n.isAsync === void 0 && Un(n, t), n.isAsync === void 0)
5057
- throw Error(b(H, `Failed to infer whether the ${e} module has top-level await`));
5057
+ throw Error(b(_, `Failed to infer whether the ${e} module has top-level await`));
5058
5058
  return n;
5059
5059
  }
5060
5060
  function xi(e, t) {
@@ -5151,7 +5151,7 @@ async function Xn(e) {
5151
5151
  ).then((s) => s.find(j)) : await Ai(e, n);
5152
5152
  }
5153
5153
  async function Ai(e, t) {
5154
- const i = u.join(e, t, `${t}.css`), n = u.join(e, t, "assets"), [s, r] = await Promise.all([z(i), z(n)]);
5154
+ const i = u.join(e, t, `${t}.css`), n = u.join(e, t, "assets"), [s, r] = await Promise.all([U(i), U(n)]);
5155
5155
  return s || r ? {
5156
5156
  hasCss: s,
5157
5157
  cdnName: t
@@ -5430,9 +5430,9 @@ async function Yn(e, t, i = Mt) {
5430
5430
  )
5431
5431
  );
5432
5432
  } else if (s.type === "file")
5433
- await _(u.dirname(r), { recursive: !0 }), await Ii(s.source, r, i, e);
5433
+ await z(u.dirname(r), { recursive: !0 }), await Ii(s.source, r, i, e);
5434
5434
  else if (s.type === "dynamic") {
5435
- await _(u.dirname(r), { recursive: !0 });
5435
+ await z(u.dirname(r), { recursive: !0 });
5436
5436
  const a = await Promise.resolve(s.source());
5437
5437
  await F(r, a);
5438
5438
  }
@@ -5492,7 +5492,7 @@ function sl(e, t, i) {
5492
5492
  const ns = (e) => e.replaceAll("../", ""), rl = (e = "") => e.split("?")[0].split("#")[0];
5493
5493
  async function ss(e) {
5494
5494
  const t = new Set(e.map(u.dirname));
5495
- await Promise.all(Array.from(t, async (i) => await _(i, { recursive: !0 })));
5495
+ await Promise.all(Array.from(t, async (i) => await z(i, { recursive: !0 })));
5496
5496
  }
5497
5497
  const ol = {
5498
5498
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
@@ -5523,10 +5523,10 @@ function al(e) {
5523
5523
  };
5524
5524
  }
5525
5525
  async function cl(e) {
5526
- const t = z("assets"), i = await e.componentFilesPromise, n = await Promise.all(
5526
+ const t = U("assets"), i = await e.componentFilesPromise, n = await Promise.all(
5527
5527
  i.map(async (s) => {
5528
5528
  const r = u.dirname(s), a = u.join(r, "assets");
5529
- return await z(a) ? rs(a, r) : void 0;
5529
+ return await U(a) ? rs(a, r) : void 0;
5530
5530
  })
5531
5531
  );
5532
5532
  return await t && n.push(os), n.filter(j);
@@ -5549,7 +5549,7 @@ function ll(e) {
5549
5549
  ).join(`
5550
5550
  `)}
5551
5551
  export * from "@arcgis/lumina/stencilSsrCompatibility";`;
5552
- await _(s, { recursive: !0 }), await Promise.all([
5552
+ await z(s, { recursive: !0 }), await Promise.all([
5553
5553
  F(
5554
5554
  u.join(s, "package.json"),
5555
5555
  `${JSON.stringify(
@@ -5831,7 +5831,7 @@ const pe = {
5831
5831
  stencilLikeDocsJson: "docs/docs.json"
5832
5832
  };
5833
5833
  async function as(e, t, i, n, s = R()) {
5834
- const r = Sl(e, i, n, s), a = u.join(t, "lumina.ts"), l = await z(a) ? await J(a, "utf8") : "";
5834
+ const r = Sl(e, i, n, s), a = u.join(t, "lumina.ts"), l = await U(a) ? await J(a, "utf8") : "";
5835
5835
  if (l === r)
5836
5836
  return !1;
5837
5837
  if (process.env.CI) {
@@ -6376,9 +6376,12 @@ function Ol(e, t) {
6376
6376
  const d = s(r.webTypes);
6377
6377
  e["web-types"] !== d && (n = !0, e["web-types"] = d);
6378
6378
  }
6379
- const a = `./${be}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = ee(t.dir.root, u.join(t.dir.dist, a));
6379
+ const a = `./${be}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = ee(
6380
+ t.dir.root,
6381
+ u.join(t.dir.distCdn, a)
6382
+ );
6380
6383
  if (!c) {
6381
- e.exports?.[a] === void 0 && (e.exports ??= {}, e.exports[a] = l, n = !0);
6384
+ e.exports?.[a] !== l && (e.exports ??= {}, e.exports[a] = l, n = !0);
6382
6385
  const d = e.name.split("/").length > 1 ? e.name.split("/")[1] : e.name;
6383
6386
  for (const p of Object.keys(e.exports))
6384
6387
  p.endsWith(`${d}.css`) && e.exports[p] !== l && (e.exports[p] = l, n = !0);
@@ -6870,7 +6873,7 @@ function wd(e) {
6870
6873
  if (e.isInStorybook)
6871
6874
  return;
6872
6875
  const i = u.join(e.dir.dist, "types");
6873
- await _(i);
6876
+ await z(i);
6874
6877
  const n = `/// <reference types="../index.d.ts" />
6875
6878
  ${t.replaceAll("./", "../")}`, s = Object.entries({
6876
6879
  react: ud(e.apiJsonComponents),
@@ -6912,7 +6915,7 @@ async function Cd(e, t) {
6912
6915
  for (const c of a.declarations)
6913
6916
  "customElement" in c && n.push($d(c));
6914
6917
  const s = [`/// <reference types="${i}" preserve="true" />`, Ed, ...n].join(""), r = u.resolve(t.proxiesFile);
6915
- await _(u.dirname(r), { recursive: !0 }), await F(r, s);
6918
+ await z(u.dirname(r), { recursive: !0 }), await F(r, s);
6916
6919
  }
6917
6920
  function $d(e) {
6918
6921
  const t = e.events?.map(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/lumina-compiler",
3
- "version": "4.33.0-next.135",
3
+ "version": "4.33.0-next.136",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -18,9 +18,9 @@
18
18
  ],
19
19
  "license": "SEE LICENSE IN LICENSE.md",
20
20
  "dependencies": {
21
- "@arcgis/api-extractor": "4.33.0-next.135",
22
- "@arcgis/components-build-utils": "4.33.0-next.135",
23
- "@arcgis/components-utils": "4.33.0-next.135",
21
+ "@arcgis/api-extractor": "4.33.0-next.136",
22
+ "@arcgis/components-build-utils": "4.33.0-next.136",
23
+ "@arcgis/components-utils": "4.33.0-next.136",
24
24
  "chalk": "^5.3.0",
25
25
  "esbuild": "^0.25.4",
26
26
  "glob": "^11.0.0",
@@ -37,6 +37,6 @@
37
37
  "vitest-fail-on-console": "^0.7.1"
38
38
  },
39
39
  "peerDependencies": {
40
- "@arcgis/lumina": "~4.33.0-next.135"
40
+ "@arcgis/lumina": "~4.33.0-next.136"
41
41
  }
42
42
  }