@ng-doc/builder 22.0.0 → 22.2.0

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 (98) hide show
  1. package/LICENSE +21 -0
  2. package/engine/builders/helpers/get-playground-metadata.js +7 -1
  3. package/engine/builders/helpers/get-playground-metadata.js.map +1 -1
  4. package/engine/builders/page/demo-assets.builder.js +2 -0
  5. package/engine/builders/page/demo-assets.builder.js.map +1 -1
  6. package/engine/builders/shared/content.builder.js +2 -0
  7. package/engine/builders/shared/content.builder.js.map +1 -1
  8. package/engine/builders/shared/page-wrapper.builder.js +2 -0
  9. package/engine/builders/shared/page-wrapper.builder.js.map +1 -1
  10. package/generator/bootstrap/bin.js +174 -107
  11. package/generator/bootstrap/cli.js +174 -107
  12. package/generator/bootstrap/index.js +139 -99
  13. package/generator/bootstrap/process-tree.d.ts +5 -4
  14. package/generator/build-metafile.json +647 -240
  15. package/generator/build-provenance.json +6 -4
  16. package/generator/compiler/index.d.ts +20 -0
  17. package/generator/compiler/index.js +2400 -945
  18. package/generator/compiler/plan.d.ts +24 -0
  19. package/generator/content/code-snippet.d.ts +20 -0
  20. package/generator/content/content-compiler.d.ts +5 -1
  21. package/generator/content/format-cache.d.ts +108 -0
  22. package/generator/content/highlight-cache.d.ts +12 -36
  23. package/generator/content/html-pipeline.d.ts +10 -1
  24. package/generator/content/html-pool.d.ts +8 -2
  25. package/generator/content/html-worker.js +630 -39
  26. package/generator/contracts.d.ts +57 -0
  27. package/generator/discovery/index.d.ts +2 -0
  28. package/generator/kernel/flags.d.ts +5 -0
  29. package/generator/outputs/index.d.ts +29 -0
  30. package/generator/semantic/angular.d.ts +21 -1
  31. package/generator/semantic/formatting.d.ts +27 -0
  32. package/generator/semantic/fragments.d.ts +11 -2
  33. package/generator/templates/api/class-declaration.html.nunj +5 -3
  34. package/generator/templates/demo-app.ts.nunj +37 -0
  35. package/generator/templates/demo-routes.ts.nunj +43 -0
  36. package/generator/templates/index.ts.nunj +5 -0
  37. package/generator/templates/page-wrapper.ts.nunj +6 -1
  38. package/generator/templates/page.ts.nunj +13 -2
  39. package/generator/templates/routes.ts.nunj +7 -3
  40. package/generator/templates/symbol/members.html.nunj +6 -4
  41. package/generator/templates/symbol/page.html.nunj +1 -1
  42. package/generator/vite/angular/analog-provenance.json +1 -1
  43. package/generator/vite/angular-composition.d.ts +25 -1
  44. package/generator/vite/application-builder.js +6 -1
  45. package/generator/vite/application.d.ts +14 -0
  46. package/generator/vite/content-updates.d.ts +62 -0
  47. package/generator/vite/demo-application.d.ts +34 -0
  48. package/generator/vite/dev-server-builder.js +6 -1
  49. package/generator/vite/host-updates.d.ts +153 -6
  50. package/generator/vite/index.js +985 -247
  51. package/generator/vite/lifecycle.d.ts +40 -2
  52. package/generator/vite/prerender-entry.js +72 -2
  53. package/generator/vite/prerender-runtime.d.ts +13 -0
  54. package/generator/vite/prerender.d.ts +2 -0
  55. package/helpers/format-cache.d.ts +34 -0
  56. package/helpers/format-cache.js +26 -0
  57. package/helpers/format-cache.js.map +1 -0
  58. package/helpers/format-code.js +9 -2
  59. package/helpers/format-code.js.map +1 -1
  60. package/helpers/playground/get-playground-inputs.js +6 -3
  61. package/helpers/playground/get-playground-inputs.js.map +1 -1
  62. package/helpers/playground/playground-options.d.ts +28 -0
  63. package/helpers/playground/playground-options.js +122 -0
  64. package/helpers/playground/playground-options.js.map +1 -0
  65. package/helpers/playground/written-union-order.d.ts +33 -0
  66. package/helpers/playground/written-union-order.js +106 -0
  67. package/helpers/playground/written-union-order.js.map +1 -0
  68. package/helpers/to-template-string.d.ts +5 -1
  69. package/helpers/to-template-string.js +7 -2
  70. package/helpers/to-template-string.js.map +1 -1
  71. package/interfaces/code-block-options.d.ts +5 -0
  72. package/interfaces/configuration.d.ts +92 -1
  73. package/package.json +6 -5
  74. package/parsers/parse-code-block-params.d.ts +10 -1
  75. package/parsers/parse-code-block-params.js +29 -3
  76. package/parsers/parse-code-block-params.js.map +1 -1
  77. package/schematics/collection.json +1 -1
  78. package/schematics/migrate-to-vite/analyze.js +46 -3
  79. package/schematics/migrate-to-vite/analyze.js.map +1 -1
  80. package/schematics/migrate-to-vite/setup/workspace.d.ts +5 -0
  81. package/schematics/migrate-to-vite/setup/workspace.js +20 -0
  82. package/schematics/migrate-to-vite/setup/workspace.js.map +1 -1
  83. package/schematics/migrate-to-vite/testing/fixtures.d.ts +12 -0
  84. package/schematics/migrate-to-vite/testing/fixtures.js +27 -0
  85. package/schematics/migrate-to-vite/testing/fixtures.js.map +1 -1
  86. package/schematics/vite-setup/index.d.ts +9 -5
  87. package/schematics/vite-setup/index.js +11 -5
  88. package/schematics/vite-setup/index.js.map +1 -1
  89. package/schematics/vite-setup/schema.json +1 -1
  90. package/templates/api/class-declaration.html.nunj +5 -3
  91. package/templates/demo-app.ts.nunj +37 -0
  92. package/templates/demo-routes.ts.nunj +43 -0
  93. package/templates/index.ts.nunj +5 -0
  94. package/templates/page-wrapper.ts.nunj +6 -1
  95. package/templates/page.ts.nunj +13 -2
  96. package/templates/routes.ts.nunj +7 -3
  97. package/templates/symbol/members.html.nunj +6 -4
  98. package/templates/symbol/page.html.nunj +1 -1
@@ -250,6 +250,21 @@ var ENGINE_SWITCHES = Object.freeze([
250
250
  values: /^(0|false|off|no)$/i,
251
251
  effect: "adding or removing a page compiles the application twice"
252
252
  },
253
+ {
254
+ name: "NGDOC_ANGULAR_DESCRIPTION_PASS",
255
+ values: /^(0|false|off|no)$/i,
256
+ effect: "a page title edit compiles the application twice"
257
+ },
258
+ {
259
+ name: "NGDOC_VITE_CONTENT_UPDATE",
260
+ values: /^(0|false|off|no)$/i,
261
+ effect: "guide text edits reload the page"
262
+ },
263
+ {
264
+ name: "NGDOC_VITE_MODULELESS_SETTLE",
265
+ values: /^(0|false|off|no)$/i,
266
+ effect: "hot updates of files the browser never loaded wait for the newest generation"
267
+ },
253
268
  {
254
269
  name: "NGDOC_VITE_BUILD_HANDOFF",
255
270
  values: /^(0|false|off|no)$/i,
@@ -260,6 +275,16 @@ var ENGINE_SWITCHES = Object.freeze([
260
275
  values: /^(0|false|off|no|verify)$/i,
261
276
  effect: "every code block is highlighted again"
262
277
  },
278
+ {
279
+ name: "NGDOC_FORMAT_CACHE",
280
+ values: /^(0|false|off|no|verify)$/i,
281
+ effect: "every signature and snippet is formatted again"
282
+ },
283
+ {
284
+ name: "NGDOC_USED_GRAMMARS",
285
+ values: /^(0|false|off|no)$/i,
286
+ effect: "every Shiki grammar is loaded before code is highlighted"
287
+ },
263
288
  {
264
289
  name: "NGDOC_PARALLEL_RENDER",
265
290
  values: /^(0|false|off|no|verify)$/i,
@@ -1596,7 +1621,7 @@ function createParcelEventSource(root, options = {}, subscribe2 = parcel.subscri
1596
1621
 
1597
1622
  // libs/builder/generator/bootstrap/constants.ts
1598
1623
  var GENERATOR_COMPILER_VERSION = "0.0.1";
1599
- var GENERATOR_TOOLCHAIN_DIGEST = "a837a4b43736f6b95b5565f442aa62d2f2175fb549d7a44138d2955d465c9ac3";
1624
+ var GENERATOR_TOOLCHAIN_DIGEST = "495b74972f5c2d99ad311bd24b03e2560f77343e401abd7c4d8185e4fee96764";
1600
1625
 
1601
1626
  // libs/builder/generator/bootstrap/index.ts
1602
1627
  import path7 from "node:path";
@@ -1614,12 +1639,17 @@ var INCREMENTAL_PROGRAM_FLAG = "NGDOC_INCREMENTAL_PROGRAM";
1614
1639
  var SHAPE_CLOSURE_FLAG = "NGDOC_SHAPE_CLOSURE";
1615
1640
  var ANGULAR_SHARED_PASS_FLAG = "NGDOC_ANGULAR_SHARED_PASS";
1616
1641
  var ANGULAR_STRUCTURAL_PASS_FLAG = "NGDOC_ANGULAR_STRUCTURAL_PASS";
1642
+ var ANGULAR_DESCRIPTION_PASS_FLAG = "NGDOC_ANGULAR_DESCRIPTION_PASS";
1643
+ var VITE_CONTENT_UPDATE_FLAG = "NGDOC_VITE_CONTENT_UPDATE";
1617
1644
  var VITE_BUILD_HANDOFF_FLAG = "NGDOC_VITE_BUILD_HANDOFF";
1645
+ var VITE_MODULELESS_SETTLE_FLAG = "NGDOC_VITE_MODULELESS_SETTLE";
1618
1646
  var TRACKED_PROGRAM_REUSE_FLAG = "NGDOC_TRACKED_PROGRAM_REUSE";
1619
1647
  var FAST_START_FLAG = "NGDOC_FAST_START";
1620
1648
  var PARALLEL_WRITES_FLAG = "NGDOC_PARALLEL_WRITES";
1621
1649
  var HIGHLIGHT_CACHE_FLAG = "NGDOC_HIGHLIGHT_CACHE";
1650
+ var FORMAT_CACHE_FLAG = "NGDOC_FORMAT_CACHE";
1622
1651
  var PARALLEL_RENDER_FLAG = "NGDOC_PARALLEL_RENDER";
1652
+ var USED_GRAMMARS_FLAG = "NGDOC_USED_GRAMMARS";
1623
1653
  var FLAGS = Object.freeze(
1624
1654
  [
1625
1655
  {
@@ -1687,6 +1717,21 @@ var FLAGS = Object.freeze(
1687
1717
  description: "In the Vite host, the generated modules and description modules a generation creates or deletes join that generation's Angular compiler pass instead of starting a pass of their own.",
1688
1718
  verify: false
1689
1719
  },
1720
+ {
1721
+ name: ANGULAR_DESCRIPTION_PASS_FLAG,
1722
+ description: "In the Vite host, an edited description module joins the Angular compiler pass of the generation it starts, when that generation rewrites generated TypeScript modules, instead of taking a pass of its own first.",
1723
+ verify: false
1724
+ },
1725
+ {
1726
+ name: VITE_CONTENT_UPDATE_FLAG,
1727
+ description: "In the Vite host, a generation that changes only content modules and the search index updates the open pages in place instead of reloading them.",
1728
+ verify: false
1729
+ },
1730
+ {
1731
+ name: VITE_MODULELESS_SETTLE_FLAG,
1732
+ description: "In the Vite host, a hot update that hands Vite no module to update settles once it is acknowledged, instead of waiting for the newest generation to be published.",
1733
+ verify: false
1734
+ },
1690
1735
  {
1691
1736
  name: VITE_BUILD_HANDOFF_FLAG,
1692
1737
  description: "The server build of the Vite production pipeline publishes the browser build's generation instead of generating again.",
@@ -1697,6 +1742,16 @@ var FLAGS = Object.freeze(
1697
1742
  description: "Code blocks are highlighted with one Shiki highlighter per runtime and cached by their text, language, meta, themes and Shiki version; development keeps the cache beside the artifact cache.",
1698
1743
  verify: true
1699
1744
  },
1745
+ {
1746
+ name: FORMAT_CACHE_FLAG,
1747
+ description: "The Prettier configuration is resolved once per generation, and formatted signatures and snippets are cached by their code, parser, configuration and Prettier version; development keeps the cache beside the artifact cache.",
1748
+ verify: true
1749
+ },
1750
+ {
1751
+ name: USED_GRAMMARS_FLAG,
1752
+ description: "Code blocks are highlighted by a highlighter that loads only the Shiki grammars their languages reach, instead of every bundled grammar; the HTML is the same.",
1753
+ verify: false
1754
+ },
1700
1755
  {
1701
1756
  name: PARALLEL_RENDER_FLAG,
1702
1757
  description: "A large generation runs the HTML processing of its pages (highlighting, anchors, keyword links, search records) on up to four worker threads, while the main thread prepares the next pages in order.",
@@ -2662,29 +2717,29 @@ function projectWatchInputs(dependencies) {
2662
2717
  const scopes = /* @__PURE__ */ new Map();
2663
2718
  const references = [];
2664
2719
  for (const dependency of dependencies) {
2665
- if (!isRecord(dependency) || typeof dependency.kind !== "string")
2720
+ if (!isRecord(dependency) || typeof dependency["kind"] !== "string")
2666
2721
  throw new Error("Invalid dependency");
2667
- switch (dependency.kind) {
2722
+ switch (dependency["kind"]) {
2668
2723
  case "content": {
2669
2724
  if (!hasExactKeys(dependency, ["digest", "kind", "path"]))
2670
2725
  throw new Error("Invalid content dependency");
2671
- files.add(path4(dependency.path, "content path"));
2672
- string(dependency.digest, "content digest");
2726
+ files.add(path4(dependency["path"], "content path"));
2727
+ string(dependency["digest"], "content digest");
2673
2728
  break;
2674
2729
  }
2675
2730
  case "existence": {
2676
- if (!hasExactKeys(dependency, ["exists", "kind", "path"]) || typeof dependency.exists !== "boolean")
2731
+ if (!hasExactKeys(dependency, ["exists", "kind", "path"]) || typeof dependency["exists"] !== "boolean")
2677
2732
  throw new Error("Invalid existence dependency");
2678
- files.add(path4(dependency.path, "existence path"));
2733
+ files.add(path4(dependency["path"], "existence path"));
2679
2734
  break;
2680
2735
  }
2681
2736
  case "glob": {
2682
2737
  if (!hasExactKeys(dependency, ["exclude", "include", "kind", "members", "root"]))
2683
2738
  throw new Error("Invalid glob dependency");
2684
- const root = path4(dependency.root, "glob root");
2685
- const include = strings(dependency.include, "glob include");
2686
- const exclude = strings(dependency.exclude, "glob exclude");
2687
- paths(dependency.members, "glob members").forEach((member) => files.add(member));
2739
+ const root = path4(dependency["root"], "glob root");
2740
+ const include = strings(dependency["include"], "glob include");
2741
+ const exclude = strings(dependency["exclude"], "glob exclude");
2742
+ paths(dependency["members"], "glob members").forEach((member) => files.add(member));
2688
2743
  const glob = { root, include, exclude };
2689
2744
  globs.set(JSON.stringify(glob), glob);
2690
2745
  break;
@@ -2692,10 +2747,10 @@ function projectWatchInputs(dependencies) {
2692
2747
  case "semantic": {
2693
2748
  if (!hasExactKeys(dependency, ["digest", "files", "kind", "reason", "scopeId"]))
2694
2749
  throw new Error("Invalid semantic dependency");
2695
- const scopeId = string(dependency.scopeId, "semantic scope ID");
2696
- const digest = string(dependency.digest, "semantic digest");
2697
- string(dependency.reason, "semantic reason");
2698
- const scopeFiles = paths(dependency.files, "semantic files");
2750
+ const scopeId = string(dependency["scopeId"], "semantic scope ID");
2751
+ const digest = string(dependency["digest"], "semantic digest");
2752
+ string(dependency["reason"], "semantic reason");
2753
+ const scopeFiles = paths(dependency["files"], "semantic files");
2699
2754
  scopeFiles.forEach((file) => files.add(file));
2700
2755
  const registered = scopes.get(scopeId) ?? [];
2701
2756
  registered.push({ digest });
@@ -2706,17 +2761,17 @@ function projectWatchInputs(dependencies) {
2706
2761
  if (!hasExactKeys(dependency, ["digest", "kind", "reason", "scopeId"]))
2707
2762
  throw new Error("Invalid semantic-reference dependency");
2708
2763
  references.push({
2709
- scopeId: string(dependency.scopeId, "semantic-reference scope ID"),
2710
- digest: string(dependency.digest, "semantic-reference digest")
2764
+ scopeId: string(dependency["scopeId"], "semantic-reference scope ID"),
2765
+ digest: string(dependency["digest"], "semantic-reference digest")
2711
2766
  });
2712
- string(dependency.reason, "semantic-reference reason");
2767
+ string(dependency["reason"], "semantic-reference reason");
2713
2768
  break;
2714
2769
  }
2715
2770
  case "keyword": {
2716
2771
  if (!hasExactKeys(dependency, ["digest", "key", "kind"]))
2717
2772
  throw new Error("Invalid keyword dependency");
2718
- string(dependency.key, "keyword key");
2719
- string(dependency.digest, "keyword digest");
2773
+ string(dependency["key"], "keyword key");
2774
+ string(dependency["digest"], "keyword digest");
2720
2775
  break;
2721
2776
  }
2722
2777
  // The non-physical kinds are validated but are never watch inputs: they name no path, and
@@ -2724,16 +2779,16 @@ function projectWatchInputs(dependencies) {
2724
2779
  case "semantic-closure": {
2725
2780
  if (!hasExactKeys(dependency, ["digest", "key", "kind", "scopeId"]))
2726
2781
  throw new Error("Invalid semantic-closure dependency");
2727
- string(dependency.scopeId, "semantic-closure scope ID");
2728
- string(dependency.key, "semantic-closure key");
2729
- string(dependency.digest, "semantic-closure digest");
2782
+ string(dependency["scopeId"], "semantic-closure scope ID");
2783
+ string(dependency["key"], "semantic-closure key");
2784
+ string(dependency["digest"], "semantic-closure digest");
2730
2785
  break;
2731
2786
  }
2732
2787
  case "evaluated": {
2733
2788
  if (!hasExactKeys(dependency, ["digest", "entryId", "kind"]))
2734
2789
  throw new Error("Invalid evaluated dependency");
2735
- string(dependency.entryId, "evaluated entry ID");
2736
- string(dependency.digest, "evaluated digest");
2790
+ string(dependency["entryId"], "evaluated entry ID");
2791
+ string(dependency["digest"], "evaluated digest");
2737
2792
  break;
2738
2793
  }
2739
2794
  default:
@@ -5750,7 +5805,7 @@ function normalizeRelative(value) {
5750
5805
  return normalized;
5751
5806
  }
5752
5807
  function trustedBase(last, request) {
5753
- const published = (manifest) => isRecord2(manifest) && manifest.projectId === last.projectId && manifest.revision === last.revision && manifest.generation === last.generation;
5808
+ const published = (manifest) => isRecord2(manifest) && manifest["projectId"] === last.projectId && manifest["revision"] === last.revision && manifest["generation"] === last.generation;
5754
5809
  const base = request.base;
5755
5810
  return isRecord2(base) && published(base.manifest) && published(request.previous) && isRecord2(base.snapshot) && base.snapshot.projectId === last.projectId && base.snapshot.revision === last.revision;
5756
5811
  }
@@ -5764,17 +5819,17 @@ function sameManifestStamp(left, right) {
5764
5819
  return left.dev === right.dev && left.ino === right.ino && left.size === right.size && left.mtimeNs === right.mtimeNs && left.ctimeNs === right.ctimeNs;
5765
5820
  }
5766
5821
  function configurationDigest(candidate) {
5767
- return isRecord2(candidate) && isRecord2(candidate.configuration) ? candidate.configuration.digest : void 0;
5822
+ return isRecord2(candidate) && isRecord2(candidate["configuration"]) ? candidate["configuration"]["digest"] : void 0;
5768
5823
  }
5769
5824
  function unchangedArtifact(artifact, last) {
5770
- const id = artifact.id;
5771
- const outputs = artifact.outputs;
5772
- if (!string2(artifact.revision) || last.revisions.get(id) !== artifact.revision || !Array.isArray(outputs) || outputs.length !== (last.counts.get(id) ?? 0))
5825
+ const id = artifact["id"];
5826
+ const outputs = artifact["outputs"];
5827
+ if (!string2(artifact["revision"]) || last.revisions.get(id) !== artifact["revision"] || !Array.isArray(outputs) || outputs.length !== (last.counts.get(id) ?? 0))
5773
5828
  return false;
5774
5829
  return outputs.every((output) => {
5775
- if (!isRecord2(output) || !string2(output.path)) return false;
5776
- const entry = last.files.get(output.path);
5777
- return entry?.ownerId === id && entry.digest === output.digest && entry.role === output.role;
5830
+ if (!isRecord2(output) || !string2(output["path"])) return false;
5831
+ const entry = last.files.get(output["path"]);
5832
+ return entry?.ownerId === id && entry.digest === output["digest"] && entry.role === output["role"];
5778
5833
  });
5779
5834
  }
5780
5835
  var EMPTY_SCOPE_FACTS = canonicalJson({ definitions: [], references: [] });
@@ -5957,7 +6012,7 @@ function stringArray(value) {
5957
6012
  function isIdentity(value) {
5958
6013
  if (!isRecord2(value) || !exact(value, ["projectId", "entryId", "role"], ["declarationId", "part"]))
5959
6014
  return false;
5960
- return string2(value.projectId) && string2(value.entryId) && [
6015
+ return string2(value["projectId"]) && string2(value["entryId"]) && [
5961
6016
  "page-shell",
5962
6017
  "content",
5963
6018
  "demo-assets",
@@ -5965,7 +6020,7 @@ function isIdentity(value) {
5965
6020
  "category",
5966
6021
  "api-list",
5967
6022
  "aggregate"
5968
- ].includes(String(value.role)) && (value.declarationId === void 0 || string2(value.declarationId)) && (value.part === void 0 || string2(value.part));
6023
+ ].includes(String(value["role"])) && (value["declarationId"] === void 0 || string2(value["declarationId"])) && (value["part"] === void 0 || string2(value["part"]));
5969
6024
  }
5970
6025
  function isFingerprint(value) {
5971
6026
  return isRecord2(value) && exact(value, [
@@ -5975,40 +6030,40 @@ function isFingerprint(value) {
5975
6030
  "configurationDigest",
5976
6031
  "inputDigest",
5977
6032
  "keywordDigest"
5978
- ]) && value.schemaVersion === SCHEMA_VERSION && [
5979
- value.compilerVersion,
5980
- value.toolchainDigest,
5981
- value.configurationDigest,
5982
- value.inputDigest,
5983
- value.keywordDigest
6033
+ ]) && value["schemaVersion"] === SCHEMA_VERSION && [
6034
+ value["compilerVersion"],
6035
+ value["toolchainDigest"],
6036
+ value["configurationDigest"],
6037
+ value["inputDigest"],
6038
+ value["keywordDigest"]
5984
6039
  ].every(string2);
5985
6040
  }
5986
6041
  function isDependency(value) {
5987
- if (!isRecord2(value) || !string2(value.kind)) return false;
5988
- if (value.kind === "content")
5989
- return exact(value, ["kind", "path", "digest"]) && string2(value.path) && string2(value.digest);
5990
- if (value.kind === "existence")
5991
- return exact(value, ["kind", "path", "exists"]) && string2(value.path) && typeof value.exists === "boolean";
5992
- if (value.kind === "glob")
5993
- return exact(value, ["kind", "root", "include", "exclude", "members"]) && string2(value.root) && stringArray(value.include) && stringArray(value.exclude) && stringArray(value.members);
5994
- if (value.kind === "semantic")
5995
- return exact(value, ["kind", "scopeId", "digest", "files", "reason"]) && string2(value.scopeId) && string2(value.digest) && stringArray(value.files) && string2(value.reason);
5996
- if (value.kind === "semantic-reference")
5997
- return exact(value, ["kind", "scopeId", "digest", "reason"]) && string2(value.scopeId) && string2(value.digest) && string2(value.reason);
5998
- if (value.kind === "semantic-closure")
5999
- return exact(value, ["kind", "scopeId", "key", "digest"]) && string2(value.scopeId) && string2(value.key) && string2(value.digest);
6000
- if (value.kind === "evaluated")
6001
- return exact(value, ["kind", "entryId", "digest"]) && string2(value.entryId) && string2(value.digest);
6002
- return value.kind === "keyword" && exact(value, ["kind", "key", "digest"]) && string2(value.key) && string2(value.digest);
6042
+ if (!isRecord2(value) || !string2(value["kind"])) return false;
6043
+ if (value["kind"] === "content")
6044
+ return exact(value, ["kind", "path", "digest"]) && string2(value["path"]) && string2(value["digest"]);
6045
+ if (value["kind"] === "existence")
6046
+ return exact(value, ["kind", "path", "exists"]) && string2(value["path"]) && typeof value["exists"] === "boolean";
6047
+ if (value["kind"] === "glob")
6048
+ return exact(value, ["kind", "root", "include", "exclude", "members"]) && string2(value["root"]) && stringArray(value["include"]) && stringArray(value["exclude"]) && stringArray(value["members"]);
6049
+ if (value["kind"] === "semantic")
6050
+ return exact(value, ["kind", "scopeId", "digest", "files", "reason"]) && string2(value["scopeId"]) && string2(value["digest"]) && stringArray(value["files"]) && string2(value["reason"]);
6051
+ if (value["kind"] === "semantic-reference")
6052
+ return exact(value, ["kind", "scopeId", "digest", "reason"]) && string2(value["scopeId"]) && string2(value["digest"]) && string2(value["reason"]);
6053
+ if (value["kind"] === "semantic-closure")
6054
+ return exact(value, ["kind", "scopeId", "key", "digest"]) && string2(value["scopeId"]) && string2(value["key"]) && string2(value["digest"]);
6055
+ if (value["kind"] === "evaluated")
6056
+ return exact(value, ["kind", "entryId", "digest"]) && string2(value["entryId"]) && string2(value["digest"]);
6057
+ return value["kind"] === "keyword" && exact(value, ["kind", "key", "digest"]) && string2(value["key"]) && string2(value["digest"]);
6003
6058
  }
6004
6059
  function isKeyword(value) {
6005
- return isRecord2(value) && exact(value, ["key", "title", "path"], ["type", "languages", "description"]) && string2(value.key) && string2(value.title) && string2(value.path) && (value.type === void 0 || value.type === "link") && (value.languages === void 0 || stringArray(value.languages)) && [value.description, value.signature].every((item) => item === void 0 || string2(item));
6060
+ return isRecord2(value) && exact(value, ["key", "title", "path"], ["type", "languages", "description"]) && string2(value["key"]) && string2(value["title"]) && string2(value["path"]) && (value["type"] === void 0 || value["type"] === "link") && (value["languages"] === void 0 || stringArray(value["languages"])) && [value["description"], value["signature"]].every((item) => item === void 0 || string2(item));
6006
6061
  }
6007
6062
  function isSource(value) {
6008
- return isRecord2(value) && exact(value, ["path"], ["line", "column"]) && string2(value.path) && (value.line === void 0 || finite(value.line)) && (value.column === void 0 || finite(value.column));
6063
+ return isRecord2(value) && exact(value, ["path"], ["line", "column"]) && string2(value["path"]) && (value["line"] === void 0 || finite(value["line"])) && (value["column"] === void 0 || finite(value["column"]));
6009
6064
  }
6010
6065
  function isDiagnostic(value) {
6011
- return isRecord2(value) && exact(value, ["code", "severity", "message", "stage"], ["source", "ownerId", "related"]) && string2(value.code) && ["error", "warning", "info"].includes(String(value.severity)) && string2(value.message) && [
6066
+ return isRecord2(value) && exact(value, ["code", "severity", "message", "stage"], ["source", "ownerId", "related"]) && string2(value["code"]) && ["error", "warning", "info"].includes(String(value["severity"])) && string2(value["message"]) && [
6012
6067
  "discovery",
6013
6068
  "evaluation",
6014
6069
  "semantic",
@@ -6017,8 +6072,8 @@ function isDiagnostic(value) {
6017
6072
  "cache",
6018
6073
  "commit",
6019
6074
  "host"
6020
- ].includes(String(value.stage)) && (value.source === void 0 || isSource(value.source)) && (value.ownerId === void 0 || string2(value.ownerId)) && (value.related === void 0 || Array.isArray(value.related) && value.related.every(
6021
- (item) => isRecord2(item) && exact(item, ["message", "source"]) && string2(item.message) && isSource(item.source)
6075
+ ].includes(String(value["stage"])) && (value["source"] === void 0 || isSource(value["source"])) && (value["ownerId"] === void 0 || string2(value["ownerId"])) && (value["related"] === void 0 || Array.isArray(value["related"]) && value["related"].every(
6076
+ (item) => isRecord2(item) && exact(item, ["message", "source"]) && string2(item["message"]) && isSource(item["source"])
6022
6077
  ));
6023
6078
  }
6024
6079
  function isSearch(value) {
@@ -6026,17 +6081,17 @@ function isSearch(value) {
6026
6081
  value,
6027
6082
  ["breadcrumbs", "pageType", "title", "section", "route", "content"],
6028
6083
  ["fragment", "kind", "signature", "description"]
6029
- ) && stringArray(value.breadcrumbs) && ["guide", "api"].includes(String(value.pageType)) && [value.title, value.section, value.route, value.content].every(string2) && [value.fragment, value.kind, value.signature, value.description].every(
6084
+ ) && stringArray(value["breadcrumbs"]) && ["guide", "api"].includes(String(value["pageType"])) && [value["title"], value["section"], value["route"], value["content"]].every(string2) && [value["fragment"], value["kind"], value["signature"], value["description"]].every(
6030
6085
  (item) => item === void 0 || string2(item)
6031
6086
  );
6032
6087
  }
6033
6088
  function isAnchor(value) {
6034
- return isRecord2(value) && exact(value, ["anchorId", "anchor", "title", "type"], ["scope"]) && [value.anchorId, value.anchor, value.title].every(string2) && ["heading", "member"].includes(String(value.type)) && (value.scope === void 0 || isRecord2(value.scope) && exact(value.scope, ["key", "title"]) && string2(value.scope.key) && string2(value.scope.title));
6089
+ return isRecord2(value) && exact(value, ["anchorId", "anchor", "title", "type"], ["scope"]) && [value["anchorId"], value["anchor"], value["title"]].every(string2) && ["heading", "member"].includes(String(value["type"])) && (value["scope"] === void 0 || isRecord2(value["scope"]) && exact(value["scope"], ["key", "title"]) && string2(value["scope"]["key"]) && string2(value["scope"]["title"]));
6035
6090
  }
6036
6091
  function isLinkedContent(value) {
6037
- if (!isRecord2(value) || !exact(value, ["ir", "html", "searchRecords", "keywordDigest"]) || !string2(value.html) || !string2(value.keywordDigest) || !Array.isArray(value.searchRecords) || !value.searchRecords.every(isSearch) || !isRecord2(value.ir))
6092
+ if (!isRecord2(value) || !exact(value, ["ir", "html", "searchRecords", "keywordDigest"]) || !string2(value["html"]) || !string2(value["keywordDigest"]) || !Array.isArray(value["searchRecords"]) || !value["searchRecords"].every(isSearch) || !isRecord2(value["ir"]))
6038
6093
  return false;
6039
- const ir = value.ir;
6094
+ const ir = value["ir"];
6040
6095
  return exact(
6041
6096
  ir,
6042
6097
  [
@@ -6055,7 +6110,9 @@ function isLinkedContent(value) {
6055
6110
  "diagnostics"
6056
6111
  ],
6057
6112
  ["icon", "searchBreadcrumbs"]
6058
- ) && ir.schemaVersion === SCHEMA_VERSION && [ir.id, ir.entryId, ir.title, ir.route, ir.absoluteRoute, ir.html].every(string2) && ["guide-tab", "api-tab", "header", "demo-assets"].includes(String(ir.role)) && (ir.searchBreadcrumbs === void 0 || stringArray(ir.searchBreadcrumbs)) && (ir.icon === void 0 || string2(ir.icon)) && Array.isArray(ir.anchors) && ir.anchors.every(isAnchor) && Array.isArray(ir.exportedKeywords) && ir.exportedKeywords.every(isKeyword) && stringArray(ir.usedKeywords) && Array.isArray(ir.dependencies) && ir.dependencies.every(isDependency) && Array.isArray(ir.diagnostics) && ir.diagnostics.every(isDiagnostic);
6113
+ ) && ir["schemaVersion"] === SCHEMA_VERSION && [ir["id"], ir["entryId"], ir["title"], ir["route"], ir["absoluteRoute"], ir["html"]].every(
6114
+ string2
6115
+ ) && ["guide-tab", "api-tab", "header", "demo-assets"].includes(String(ir["role"])) && (ir["searchBreadcrumbs"] === void 0 || stringArray(ir["searchBreadcrumbs"])) && (ir["icon"] === void 0 || string2(ir["icon"])) && Array.isArray(ir["anchors"]) && ir["anchors"].every(isAnchor) && Array.isArray(ir["exportedKeywords"]) && ir["exportedKeywords"].every(isKeyword) && stringArray(ir["usedKeywords"]) && Array.isArray(ir["dependencies"]) && ir["dependencies"].every(isDependency) && Array.isArray(ir["diagnostics"]) && ir["diagnostics"].every(isDiagnostic);
6059
6116
  }
6060
6117
  function isRoute(value) {
6061
6118
  return isRecord2(value) && exact(
@@ -6069,23 +6126,31 @@ function isRoute(value) {
6069
6126
  "metadata",
6070
6127
  "category",
6071
6128
  "modulePath",
6072
- "apiListSegment"
6129
+ "apiListSegment",
6130
+ "demoModulePath",
6131
+ "demoNames",
6132
+ "playgroundPages"
6073
6133
  ]
6074
- ) && [value.id, value.path, value.title].every(string2) && (value.parentId === void 0 || string2(value.parentId)) && (value.order === void 0 || finite(value.order)) && (value.hidden === void 0 || typeof value.hidden === "boolean") && (value.icon === void 0 || string2(value.icon)) && (value.modulePath === void 0 || string2(value.modulePath)) && (value.apiListSegment === void 0 || string2(value.apiListSegment)) && (value.metadata === void 0 || isRecord2(value.metadata) && exact(value.metadata, ["description", "tags"]) && string2(value.metadata.description) && isRecord2(value.metadata.tags) && Object.values(value.metadata.tags).every(stringArray)) && (value.category === void 0 || isRecord2(value.category) && exact(value.category, ["runtimeImport"], ["expandable", "expanded"]) && isRecord2(value.category.runtimeImport) && exact(value.category.runtimeImport, ["source", "exportName"]) && string2(value.category.runtimeImport.source) && string2(value.category.runtimeImport.exportName) && (value.category.expandable === void 0 || typeof value.category.expandable === "boolean") && (value.category.expanded === void 0 || typeof value.category.expanded === "boolean"));
6134
+ ) && [value["id"], value["path"], value["title"]].every(string2) && (value["parentId"] === void 0 || string2(value["parentId"])) && (value["order"] === void 0 || finite(value["order"])) && (value["hidden"] === void 0 || typeof value["hidden"] === "boolean") && (value["icon"] === void 0 || string2(value["icon"])) && (value["modulePath"] === void 0 || string2(value["modulePath"])) && (value["apiListSegment"] === void 0 || string2(value["apiListSegment"])) && (value["demoModulePath"] === void 0 || string2(value["demoModulePath"])) && (value["demoNames"] === void 0 || stringArray(value["demoNames"])) && (value["playgroundPages"] === void 0 || stringArray(value["playgroundPages"])) && (value["metadata"] === void 0 || isRecord2(value["metadata"]) && exact(value["metadata"], ["description", "tags"]) && string2(value["metadata"]["description"]) && isRecord2(value["metadata"]["tags"]) && Object.values(value["metadata"]["tags"]).every(stringArray)) && (value["category"] === void 0 || isRecord2(value["category"]) && exact(value["category"], ["runtimeImport"], ["expandable", "expanded"]) && isRecord2(value["category"]["runtimeImport"]) && exact(value["category"]["runtimeImport"], ["source", "exportName"]) && string2(value["category"]["runtimeImport"]["source"]) && string2(value["category"]["runtimeImport"]["exportName"]) && (value["category"]["expandable"] === void 0 || typeof value["category"]["expandable"] === "boolean") && (value["category"]["expanded"] === void 0 || typeof value["category"]["expanded"] === "boolean"));
6075
6135
  }
6076
6136
  function isApiList(value) {
6077
6137
  return isRecord2(value) && exact(
6078
6138
  value,
6079
6139
  ["apiEntryId", "scopeId", "scopeTitle", "name", "type", "route"],
6080
6140
  ["description", "signature"]
6081
- ) && [value.apiEntryId, value.scopeId, value.scopeTitle, value.name, value.type, value.route].every(
6082
- string2
6083
- ) && [value.description, value.signature].every((item) => item === void 0 || string2(item));
6141
+ ) && [
6142
+ value["apiEntryId"],
6143
+ value["scopeId"],
6144
+ value["scopeTitle"],
6145
+ value["name"],
6146
+ value["type"],
6147
+ value["route"]
6148
+ ].every(string2) && [value["description"], value["signature"]].every((item) => item === void 0 || string2(item));
6084
6149
  }
6085
6150
  function isFileOutput(value) {
6086
- return isRecord2(value) && exact(value, ["path", "role", "encoding", "content", "digest"]) && string2(value.path) && ["angular", "content", "asset", "routes", "context", "search", "api-list"].includes(
6087
- String(value.role)
6088
- ) && ["utf8", "base64"].includes(String(value.encoding)) && string2(value.content) && string2(value.digest);
6151
+ return isRecord2(value) && exact(value, ["path", "role", "encoding", "content", "digest"]) && string2(value["path"]) && ["angular", "content", "asset", "routes", "context", "search", "api-list"].includes(
6152
+ String(value["role"])
6153
+ ) && ["utf8", "base64"].includes(String(value["encoding"])) && string2(value["content"]) && string2(value["digest"]);
6089
6154
  }
6090
6155
  function isContentDescriptor(value) {
6091
6156
  if (!isRecord2(value) || !exact(
@@ -6109,23 +6174,23 @@ function isContentDescriptor(value) {
6109
6174
  ["icon", "keyword"]
6110
6175
  ))
6111
6176
  return false;
6112
- if (value.schemaVersion !== SCHEMA_VERSION || ![
6113
- value.id,
6114
- value.ownerId,
6115
- value.title,
6116
- value.route,
6117
- value.absoluteRoute,
6118
- value.inputDigest,
6119
- value.requestDigest
6120
- ].every(string2) || ![value.id, value.ownerId, value.inputDigest, value.requestDigest].every(
6177
+ if (value["schemaVersion"] !== SCHEMA_VERSION || ![
6178
+ value["id"],
6179
+ value["ownerId"],
6180
+ value["title"],
6181
+ value["route"],
6182
+ value["absoluteRoute"],
6183
+ value["inputDigest"],
6184
+ value["requestDigest"]
6185
+ ].every(string2) || ![value["id"], value["ownerId"], value["inputDigest"], value["requestDigest"]].every(
6121
6186
  (item) => string2(item) && item.length > 0 && !item.includes("\0")
6122
- ) || !finite(value.ordinal) || value.ordinal < 0 || !Number.isInteger(value.ordinal) || !["guide-tab", "api-tab", "header"].includes(String(value.role)) || !stringArray(value.searchBreadcrumbs) || !Array.isArray(value.dependencies) || !value.dependencies.every((dependency) => isPhysicalDescriptorDependency(dependency)) || new Set(value.dependencies.map((dependency) => canonicalJson(dependency))).size !== value.dependencies.length || !stringArray(value.closureIds) || value.icon !== void 0 && !string2(value.icon) || value.keyword !== void 0 && !string2(value.keyword) || !isRecord2(value.locator))
6187
+ ) || !finite(value["ordinal"]) || value["ordinal"] < 0 || !Number.isInteger(value["ordinal"]) || !["guide-tab", "api-tab", "header"].includes(String(value["role"])) || !stringArray(value["searchBreadcrumbs"]) || !Array.isArray(value["dependencies"]) || !value["dependencies"].every((dependency) => isPhysicalDescriptorDependency(dependency)) || new Set(value["dependencies"].map((dependency) => canonicalJson(dependency))).size !== value["dependencies"].length || !stringArray(value["closureIds"]) || value["icon"] !== void 0 && !string2(value["icon"]) || value["keyword"] !== void 0 && !string2(value["keyword"]) || !isRecord2(value["locator"]))
6123
6188
  return false;
6124
- const locator = value.locator;
6125
- return value.role === "header" ? exact(locator, ["kind"]) && locator.kind === "header" : value.role === "guide-tab" ? exact(locator, ["kind", "markdown"]) && locator.kind === "guide-tab" && string2(locator.markdown) : exact(locator, ["kind", "declarationId"]) && locator.kind === "api-tab" && string2(locator.declarationId);
6189
+ const locator = value["locator"];
6190
+ return value["role"] === "header" ? exact(locator, ["kind"]) && locator["kind"] === "header" : value["role"] === "guide-tab" ? exact(locator, ["kind", "markdown"]) && locator["kind"] === "guide-tab" && string2(locator["markdown"]) : exact(locator, ["kind", "declarationId"]) && locator["kind"] === "api-tab" && string2(locator["declarationId"]);
6126
6191
  }
6127
6192
  function isPhysicalDescriptorDependency(value) {
6128
- return isRecord2(value) && (value.kind === "content" && exact(value, ["kind", "path", "digest"]) && absoluteNormalizedPath(value.path) && string2(value.digest) || value.kind === "existence" && exact(value, ["kind", "path", "exists"]) && absoluteNormalizedPath(value.path) && typeof value.exists === "boolean");
6193
+ return isRecord2(value) && (value["kind"] === "content" && exact(value, ["kind", "path", "digest"]) && absoluteNormalizedPath(value["path"]) && string2(value["digest"]) || value["kind"] === "existence" && exact(value, ["kind", "path", "exists"]) && absoluteNormalizedPath(value["path"]) && typeof value["exists"] === "boolean");
6129
6194
  }
6130
6195
  function validDescriptorPlan(artifact) {
6131
6196
  const descriptors = artifact.contentDescriptors;
@@ -6210,7 +6275,7 @@ function isPageArtifact(value) {
6210
6275
  "diagnostics"
6211
6276
  ],
6212
6277
  ["contentDescriptors"]
6213
- ) && string2(value.id) && isIdentity(value.identity) && string2(value.revision) && isFingerprint(value.fingerprint) && Array.isArray(value.dependencies) && value.dependencies.every(isDependency) && Array.isArray(value.content) && value.content.every(isLinkedContent) && Array.isArray(value.exportedKeywords) && value.exportedKeywords.every(isKeyword) && stringArray(value.usedKeywords) && Array.isArray(value.searchRecords) && value.searchRecords.every(isSearch) && Array.isArray(value.routes) && value.routes.every(isRoute) && Array.isArray(value.apiList) && value.apiList.every(isApiList) && Array.isArray(value.outputs) && value.outputs.every((output) => isFileOutput(output) && validOutputDigest(output)) && Array.isArray(value.diagnostics) && value.diagnostics.every(isDiagnostic) && validDescriptorPlan(value);
6278
+ ) && string2(value["id"]) && isIdentity(value["identity"]) && string2(value["revision"]) && isFingerprint(value["fingerprint"]) && Array.isArray(value["dependencies"]) && value["dependencies"].every(isDependency) && Array.isArray(value["content"]) && value["content"].every(isLinkedContent) && Array.isArray(value["exportedKeywords"]) && value["exportedKeywords"].every(isKeyword) && stringArray(value["usedKeywords"]) && Array.isArray(value["searchRecords"]) && value["searchRecords"].every(isSearch) && Array.isArray(value["routes"]) && value["routes"].every(isRoute) && Array.isArray(value["apiList"]) && value["apiList"].every(isApiList) && Array.isArray(value["outputs"]) && value["outputs"].every((output) => isFileOutput(output) && validOutputDigest(output)) && Array.isArray(value["diagnostics"]) && value["diagnostics"].every(isDiagnostic) && validDescriptorPlan(value);
6214
6279
  }
6215
6280
  function isJsonTree(value, ancestors = /* @__PURE__ */ new WeakSet()) {
6216
6281
  if (value === null || string2(value) || typeof value === "boolean") return true;
@@ -6245,19 +6310,19 @@ function validOutputDigest(output) {
6245
6310
  }
6246
6311
  }
6247
6312
  function isPublishedGeneratorConfiguration(value) {
6248
- return isJsonTree(value) && isRecord2(value) && exact(value, ["outputRoot", "cacheRoot", "assetDirectory", "themes", "digest"]) && [value.outputRoot, value.cacheRoot].every(
6313
+ return isJsonTree(value) && isRecord2(value) && exact(value, ["outputRoot", "cacheRoot", "assetDirectory", "themes", "digest"]) && [value["outputRoot"], value["cacheRoot"]].every(
6249
6314
  (item) => string2(item) && path6.isAbsolute(item) && path6.resolve(item).replace(/\\/g, "/") === item && !item.includes("\0")
6250
- ) && string2(value.assetDirectory) && !path6.win32.parse(value.assetDirectory).root && safeRelative(value.assetDirectory) && isRecord2(value.themes) && exact(value.themes, ["light", "dark"]) && string2(value.themes.light) && string2(value.themes.dark) && string2(value.digest);
6315
+ ) && string2(value["assetDirectory"]) && !path6.win32.parse(value["assetDirectory"]).root && safeRelative(value["assetDirectory"]) && isRecord2(value["themes"]) && exact(value["themes"], ["light", "dark"]) && string2(value["themes"]["light"]) && string2(value["themes"]["dark"]) && string2(value["digest"]);
6251
6316
  }
6252
6317
  function isArtifactSnapshotShape(value) {
6253
6318
  return isJsonTree(value) && isRecord2(value) && exact(
6254
6319
  value,
6255
6320
  ["projectId", "revision", "artifacts", "globalKeywords", "remoteKeywords"],
6256
6321
  ["configuration"]
6257
- ) && (value.configuration === void 0 || isPublishedGeneratorConfiguration(value.configuration)) && string2(value.projectId) && string2(value.revision) && Array.isArray(value.artifacts) && value.artifacts.every(isPageArtifact) && Array.isArray(value.globalKeywords) && value.globalKeywords.every(isKeyword) && Array.isArray(value.remoteKeywords) && value.remoteKeywords.every(isRemoteKeywords);
6322
+ ) && (value["configuration"] === void 0 || isPublishedGeneratorConfiguration(value["configuration"])) && string2(value["projectId"]) && string2(value["revision"]) && Array.isArray(value["artifacts"]) && value["artifacts"].every(isPageArtifact) && Array.isArray(value["globalKeywords"]) && value["globalKeywords"].every(isKeyword) && Array.isArray(value["remoteKeywords"]) && value["remoteKeywords"].every(isRemoteKeywords);
6258
6323
  }
6259
6324
  function isRemoteKeywords(remote) {
6260
- return isRecord2(remote) && exact(remote, ["loaderId", "digest", "keywords"], ["validator"]) && string2(remote.loaderId) && string2(remote.digest) && Array.isArray(remote.keywords) && remote.keywords.every(isKeyword) && (remote.validator === void 0 || string2(remote.validator));
6325
+ return isRecord2(remote) && exact(remote, ["loaderId", "digest", "keywords"], ["validator"]) && string2(remote["loaderId"]) && string2(remote["digest"]) && Array.isArray(remote["keywords"]) && remote["keywords"].every(isKeyword) && (remote["validator"] === void 0 || string2(remote["validator"]));
6261
6326
  }
6262
6327
  function isSnapshotEnvelope(value) {
6263
6328
  if (!isRecord2(value) || Object.getPrototypeOf(value) !== Object.prototype) return false;
@@ -6268,7 +6333,7 @@ function isSnapshotEnvelope(value) {
6268
6333
  return descriptor?.enumerable === true && "value" in descriptor;
6269
6334
  }))
6270
6335
  return false;
6271
- const artifacts = value.artifacts;
6336
+ const artifacts = value["artifacts"];
6272
6337
  if (!Array.isArray(artifacts) || Object.getPrototypeOf(artifacts) !== Array.prototype || Reflect.ownKeys(artifacts).length !== artifacts.length + 1)
6273
6338
  return false;
6274
6339
  for (let index = 0; index < artifacts.length; index += 1)
@@ -6277,14 +6342,14 @@ function isSnapshotEnvelope(value) {
6277
6342
  value,
6278
6343
  ["projectId", "revision", "artifacts", "globalKeywords", "remoteKeywords"],
6279
6344
  ["configuration"]
6280
- ) && (value.configuration === void 0 || isPublishedGeneratorConfiguration(value.configuration)) && string2(value.projectId) && string2(value.revision) && isJsonTree(value.globalKeywords) && Array.isArray(value.globalKeywords) && value.globalKeywords.every(isKeyword) && isJsonTree(value.remoteKeywords) && Array.isArray(value.remoteKeywords) && value.remoteKeywords.every(isRemoteKeywords);
6345
+ ) && (value["configuration"] === void 0 || isPublishedGeneratorConfiguration(value["configuration"])) && string2(value["projectId"]) && string2(value["revision"]) && isJsonTree(value["globalKeywords"]) && Array.isArray(value["globalKeywords"]) && value["globalKeywords"].every(isKeyword) && isJsonTree(value["remoteKeywords"]) && Array.isArray(value["remoteKeywords"]) && value["remoteKeywords"].every(isRemoteKeywords);
6281
6346
  }
6282
6347
  function isOutputManifest(value) {
6283
- return isJsonTree(value) && isRecord2(value) && exact(value, ["schemaVersion", "projectId", "generation", "revision", "files"]) && value.schemaVersion === OUTPUT_SCHEMA_VERSION && string2(value.projectId) && finite(value.generation) && string2(value.revision) && Array.isArray(value.files) && value.files.every(
6284
- (file) => isRecord2(file) && exact(file, ["path", "ownerId", "digest", "role"]) && string2(file.path) && string2(file.ownerId) && string2(file.digest) && safeRelative(file.path) && ["angular", "content", "asset", "routes", "context", "search", "api-list"].includes(
6285
- String(file.role)
6348
+ return isJsonTree(value) && isRecord2(value) && exact(value, ["schemaVersion", "projectId", "generation", "revision", "files"]) && value["schemaVersion"] === OUTPUT_SCHEMA_VERSION && string2(value["projectId"]) && finite(value["generation"]) && string2(value["revision"]) && Array.isArray(value["files"]) && value["files"].every(
6349
+ (file) => isRecord2(file) && exact(file, ["path", "ownerId", "digest", "role"]) && string2(file["path"]) && string2(file["ownerId"]) && string2(file["digest"]) && safeRelative(file["path"]) && ["angular", "content", "asset", "routes", "context", "search", "api-list"].includes(
6350
+ String(file["role"])
6286
6351
  )
6287
- ) && new Set(value.files.map((file) => file.path)).size === value.files.length;
6352
+ ) && new Set(value["files"].map((file) => file.path)).size === value["files"].length;
6288
6353
  }
6289
6354
  function safeRelative(value) {
6290
6355
  try {
@@ -6576,16 +6641,18 @@ function quoteWindowsArgument(value, twice = false) {
6576
6641
  }
6577
6642
  function nodeEntry(command, options) {
6578
6643
  const exists2 = options.isFile ?? isFile;
6579
- const name = /^(ng|npm|npx)(?:\.cmd)?$/i.exec(command)?.[1]?.toLowerCase();
6644
+ const name = /^(ng|npm|npx|pnpm|pnpx)(?:\.cmd)?$/i.exec(command)?.[1]?.toLowerCase();
6580
6645
  if (!name) return void 0;
6646
+ const nodeDirectory = path8.win32.dirname(options.execPath ?? process.execPath);
6647
+ if (name === "pnpm" || name === "pnpx") {
6648
+ const shim = resolveWindowsCommand(name, options);
6649
+ if (!shim || path8.win32.dirname(shim).toLowerCase() !== nodeDirectory.toLowerCase())
6650
+ return void 0;
6651
+ const entry = path8.win32.join(nodeDirectory, "node_modules", "corepack", "dist", `${name}.js`);
6652
+ return exists2(entry) ? entry : void 0;
6653
+ }
6581
6654
  if (name !== "ng") {
6582
- const entry = path8.win32.join(
6583
- path8.win32.dirname(options.execPath ?? process.execPath),
6584
- "node_modules",
6585
- "npm",
6586
- "bin",
6587
- `${name}-cli.js`
6588
- );
6655
+ const entry = path8.win32.join(nodeDirectory, "node_modules", "npm", "bin", `${name}-cli.js`);
6589
6656
  return exists2(entry) ? entry : void 0;
6590
6657
  }
6591
6658
  for (let directory = path8.win32.resolve(options.cwd); ; ) {