@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.
- package/LICENSE +21 -0
- package/engine/builders/helpers/get-playground-metadata.js +7 -1
- package/engine/builders/helpers/get-playground-metadata.js.map +1 -1
- package/engine/builders/page/demo-assets.builder.js +2 -0
- package/engine/builders/page/demo-assets.builder.js.map +1 -1
- package/engine/builders/shared/content.builder.js +2 -0
- package/engine/builders/shared/content.builder.js.map +1 -1
- package/engine/builders/shared/page-wrapper.builder.js +2 -0
- package/engine/builders/shared/page-wrapper.builder.js.map +1 -1
- package/generator/bootstrap/bin.js +174 -107
- package/generator/bootstrap/cli.js +174 -107
- package/generator/bootstrap/index.js +139 -99
- package/generator/bootstrap/process-tree.d.ts +5 -4
- package/generator/build-metafile.json +647 -240
- package/generator/build-provenance.json +6 -4
- package/generator/compiler/index.d.ts +20 -0
- package/generator/compiler/index.js +2400 -945
- package/generator/compiler/plan.d.ts +24 -0
- package/generator/content/code-snippet.d.ts +20 -0
- package/generator/content/content-compiler.d.ts +5 -1
- package/generator/content/format-cache.d.ts +108 -0
- package/generator/content/highlight-cache.d.ts +12 -36
- package/generator/content/html-pipeline.d.ts +10 -1
- package/generator/content/html-pool.d.ts +8 -2
- package/generator/content/html-worker.js +630 -39
- package/generator/contracts.d.ts +57 -0
- package/generator/discovery/index.d.ts +2 -0
- package/generator/kernel/flags.d.ts +5 -0
- package/generator/outputs/index.d.ts +29 -0
- package/generator/semantic/angular.d.ts +21 -1
- package/generator/semantic/formatting.d.ts +27 -0
- package/generator/semantic/fragments.d.ts +11 -2
- package/generator/templates/api/class-declaration.html.nunj +5 -3
- package/generator/templates/demo-app.ts.nunj +37 -0
- package/generator/templates/demo-routes.ts.nunj +43 -0
- package/generator/templates/index.ts.nunj +5 -0
- package/generator/templates/page-wrapper.ts.nunj +6 -1
- package/generator/templates/page.ts.nunj +13 -2
- package/generator/templates/routes.ts.nunj +7 -3
- package/generator/templates/symbol/members.html.nunj +6 -4
- package/generator/templates/symbol/page.html.nunj +1 -1
- package/generator/vite/angular/analog-provenance.json +1 -1
- package/generator/vite/angular-composition.d.ts +25 -1
- package/generator/vite/application-builder.js +6 -1
- package/generator/vite/application.d.ts +14 -0
- package/generator/vite/content-updates.d.ts +62 -0
- package/generator/vite/demo-application.d.ts +34 -0
- package/generator/vite/dev-server-builder.js +6 -1
- package/generator/vite/host-updates.d.ts +153 -6
- package/generator/vite/index.js +985 -247
- package/generator/vite/lifecycle.d.ts +40 -2
- package/generator/vite/prerender-entry.js +72 -2
- package/generator/vite/prerender-runtime.d.ts +13 -0
- package/generator/vite/prerender.d.ts +2 -0
- package/helpers/format-cache.d.ts +34 -0
- package/helpers/format-cache.js +26 -0
- package/helpers/format-cache.js.map +1 -0
- package/helpers/format-code.js +9 -2
- package/helpers/format-code.js.map +1 -1
- package/helpers/playground/get-playground-inputs.js +6 -3
- package/helpers/playground/get-playground-inputs.js.map +1 -1
- package/helpers/playground/playground-options.d.ts +28 -0
- package/helpers/playground/playground-options.js +122 -0
- package/helpers/playground/playground-options.js.map +1 -0
- package/helpers/playground/written-union-order.d.ts +33 -0
- package/helpers/playground/written-union-order.js +106 -0
- package/helpers/playground/written-union-order.js.map +1 -0
- package/helpers/to-template-string.d.ts +5 -1
- package/helpers/to-template-string.js +7 -2
- package/helpers/to-template-string.js.map +1 -1
- package/interfaces/code-block-options.d.ts +5 -0
- package/interfaces/configuration.d.ts +92 -1
- package/package.json +6 -5
- package/parsers/parse-code-block-params.d.ts +10 -1
- package/parsers/parse-code-block-params.js +29 -3
- package/parsers/parse-code-block-params.js.map +1 -1
- package/schematics/collection.json +1 -1
- package/schematics/migrate-to-vite/analyze.js +46 -3
- package/schematics/migrate-to-vite/analyze.js.map +1 -1
- package/schematics/migrate-to-vite/setup/workspace.d.ts +5 -0
- package/schematics/migrate-to-vite/setup/workspace.js +20 -0
- package/schematics/migrate-to-vite/setup/workspace.js.map +1 -1
- package/schematics/migrate-to-vite/testing/fixtures.d.ts +12 -0
- package/schematics/migrate-to-vite/testing/fixtures.js +27 -0
- package/schematics/migrate-to-vite/testing/fixtures.js.map +1 -1
- package/schematics/vite-setup/index.d.ts +9 -5
- package/schematics/vite-setup/index.js +11 -5
- package/schematics/vite-setup/index.js.map +1 -1
- package/schematics/vite-setup/schema.json +1 -1
- package/templates/api/class-declaration.html.nunj +5 -3
- package/templates/demo-app.ts.nunj +37 -0
- package/templates/demo-routes.ts.nunj +43 -0
- package/templates/index.ts.nunj +5 -0
- package/templates/page-wrapper.ts.nunj +6 -1
- package/templates/page.ts.nunj +13 -2
- package/templates/routes.ts.nunj +7 -3
- package/templates/symbol/members.html.nunj +6 -4
- package/templates/symbol/page.html.nunj +1 -1
|
@@ -14,12 +14,17 @@ var INCREMENTAL_PROGRAM_FLAG = "NGDOC_INCREMENTAL_PROGRAM";
|
|
|
14
14
|
var SHAPE_CLOSURE_FLAG = "NGDOC_SHAPE_CLOSURE";
|
|
15
15
|
var ANGULAR_SHARED_PASS_FLAG = "NGDOC_ANGULAR_SHARED_PASS";
|
|
16
16
|
var ANGULAR_STRUCTURAL_PASS_FLAG = "NGDOC_ANGULAR_STRUCTURAL_PASS";
|
|
17
|
+
var ANGULAR_DESCRIPTION_PASS_FLAG = "NGDOC_ANGULAR_DESCRIPTION_PASS";
|
|
18
|
+
var VITE_CONTENT_UPDATE_FLAG = "NGDOC_VITE_CONTENT_UPDATE";
|
|
17
19
|
var VITE_BUILD_HANDOFF_FLAG = "NGDOC_VITE_BUILD_HANDOFF";
|
|
20
|
+
var VITE_MODULELESS_SETTLE_FLAG = "NGDOC_VITE_MODULELESS_SETTLE";
|
|
18
21
|
var TRACKED_PROGRAM_REUSE_FLAG = "NGDOC_TRACKED_PROGRAM_REUSE";
|
|
19
22
|
var FAST_START_FLAG = "NGDOC_FAST_START";
|
|
20
23
|
var PARALLEL_WRITES_FLAG = "NGDOC_PARALLEL_WRITES";
|
|
21
24
|
var HIGHLIGHT_CACHE_FLAG = "NGDOC_HIGHLIGHT_CACHE";
|
|
25
|
+
var FORMAT_CACHE_FLAG = "NGDOC_FORMAT_CACHE";
|
|
22
26
|
var PARALLEL_RENDER_FLAG = "NGDOC_PARALLEL_RENDER";
|
|
27
|
+
var USED_GRAMMARS_FLAG = "NGDOC_USED_GRAMMARS";
|
|
23
28
|
var FLAGS = Object.freeze(
|
|
24
29
|
[
|
|
25
30
|
{
|
|
@@ -87,6 +92,21 @@ var FLAGS = Object.freeze(
|
|
|
87
92
|
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.",
|
|
88
93
|
verify: false
|
|
89
94
|
},
|
|
95
|
+
{
|
|
96
|
+
name: ANGULAR_DESCRIPTION_PASS_FLAG,
|
|
97
|
+
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.",
|
|
98
|
+
verify: false
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: VITE_CONTENT_UPDATE_FLAG,
|
|
102
|
+
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.",
|
|
103
|
+
verify: false
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: VITE_MODULELESS_SETTLE_FLAG,
|
|
107
|
+
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.",
|
|
108
|
+
verify: false
|
|
109
|
+
},
|
|
90
110
|
{
|
|
91
111
|
name: VITE_BUILD_HANDOFF_FLAG,
|
|
92
112
|
description: "The server build of the Vite production pipeline publishes the browser build's generation instead of generating again.",
|
|
@@ -97,6 +117,16 @@ var FLAGS = Object.freeze(
|
|
|
97
117
|
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.",
|
|
98
118
|
verify: true
|
|
99
119
|
},
|
|
120
|
+
{
|
|
121
|
+
name: FORMAT_CACHE_FLAG,
|
|
122
|
+
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.",
|
|
123
|
+
verify: true
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: USED_GRAMMARS_FLAG,
|
|
127
|
+
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.",
|
|
128
|
+
verify: false
|
|
129
|
+
},
|
|
100
130
|
{
|
|
101
131
|
name: PARALLEL_RENDER_FLAG,
|
|
102
132
|
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.",
|
|
@@ -1123,29 +1153,29 @@ function projectWatchInputs(dependencies) {
|
|
|
1123
1153
|
const scopes = /* @__PURE__ */ new Map();
|
|
1124
1154
|
const references = [];
|
|
1125
1155
|
for (const dependency of dependencies) {
|
|
1126
|
-
if (!isRecord(dependency) || typeof dependency
|
|
1156
|
+
if (!isRecord(dependency) || typeof dependency["kind"] !== "string")
|
|
1127
1157
|
throw new Error("Invalid dependency");
|
|
1128
|
-
switch (dependency
|
|
1158
|
+
switch (dependency["kind"]) {
|
|
1129
1159
|
case "content": {
|
|
1130
1160
|
if (!hasExactKeys(dependency, ["digest", "kind", "path"]))
|
|
1131
1161
|
throw new Error("Invalid content dependency");
|
|
1132
|
-
files.add(path4(dependency
|
|
1133
|
-
string(dependency
|
|
1162
|
+
files.add(path4(dependency["path"], "content path"));
|
|
1163
|
+
string(dependency["digest"], "content digest");
|
|
1134
1164
|
break;
|
|
1135
1165
|
}
|
|
1136
1166
|
case "existence": {
|
|
1137
|
-
if (!hasExactKeys(dependency, ["exists", "kind", "path"]) || typeof dependency
|
|
1167
|
+
if (!hasExactKeys(dependency, ["exists", "kind", "path"]) || typeof dependency["exists"] !== "boolean")
|
|
1138
1168
|
throw new Error("Invalid existence dependency");
|
|
1139
|
-
files.add(path4(dependency
|
|
1169
|
+
files.add(path4(dependency["path"], "existence path"));
|
|
1140
1170
|
break;
|
|
1141
1171
|
}
|
|
1142
1172
|
case "glob": {
|
|
1143
1173
|
if (!hasExactKeys(dependency, ["exclude", "include", "kind", "members", "root"]))
|
|
1144
1174
|
throw new Error("Invalid glob dependency");
|
|
1145
|
-
const root = path4(dependency
|
|
1146
|
-
const include = strings(dependency
|
|
1147
|
-
const exclude = strings(dependency
|
|
1148
|
-
paths(dependency
|
|
1175
|
+
const root = path4(dependency["root"], "glob root");
|
|
1176
|
+
const include = strings(dependency["include"], "glob include");
|
|
1177
|
+
const exclude = strings(dependency["exclude"], "glob exclude");
|
|
1178
|
+
paths(dependency["members"], "glob members").forEach((member) => files.add(member));
|
|
1149
1179
|
const glob = { root, include, exclude };
|
|
1150
1180
|
globs.set(JSON.stringify(glob), glob);
|
|
1151
1181
|
break;
|
|
@@ -1153,10 +1183,10 @@ function projectWatchInputs(dependencies) {
|
|
|
1153
1183
|
case "semantic": {
|
|
1154
1184
|
if (!hasExactKeys(dependency, ["digest", "files", "kind", "reason", "scopeId"]))
|
|
1155
1185
|
throw new Error("Invalid semantic dependency");
|
|
1156
|
-
const scopeId = string(dependency
|
|
1157
|
-
const digest = string(dependency
|
|
1158
|
-
string(dependency
|
|
1159
|
-
const scopeFiles = paths(dependency
|
|
1186
|
+
const scopeId = string(dependency["scopeId"], "semantic scope ID");
|
|
1187
|
+
const digest = string(dependency["digest"], "semantic digest");
|
|
1188
|
+
string(dependency["reason"], "semantic reason");
|
|
1189
|
+
const scopeFiles = paths(dependency["files"], "semantic files");
|
|
1160
1190
|
scopeFiles.forEach((file) => files.add(file));
|
|
1161
1191
|
const registered = scopes.get(scopeId) ?? [];
|
|
1162
1192
|
registered.push({ digest });
|
|
@@ -1167,17 +1197,17 @@ function projectWatchInputs(dependencies) {
|
|
|
1167
1197
|
if (!hasExactKeys(dependency, ["digest", "kind", "reason", "scopeId"]))
|
|
1168
1198
|
throw new Error("Invalid semantic-reference dependency");
|
|
1169
1199
|
references.push({
|
|
1170
|
-
scopeId: string(dependency
|
|
1171
|
-
digest: string(dependency
|
|
1200
|
+
scopeId: string(dependency["scopeId"], "semantic-reference scope ID"),
|
|
1201
|
+
digest: string(dependency["digest"], "semantic-reference digest")
|
|
1172
1202
|
});
|
|
1173
|
-
string(dependency
|
|
1203
|
+
string(dependency["reason"], "semantic-reference reason");
|
|
1174
1204
|
break;
|
|
1175
1205
|
}
|
|
1176
1206
|
case "keyword": {
|
|
1177
1207
|
if (!hasExactKeys(dependency, ["digest", "key", "kind"]))
|
|
1178
1208
|
throw new Error("Invalid keyword dependency");
|
|
1179
|
-
string(dependency
|
|
1180
|
-
string(dependency
|
|
1209
|
+
string(dependency["key"], "keyword key");
|
|
1210
|
+
string(dependency["digest"], "keyword digest");
|
|
1181
1211
|
break;
|
|
1182
1212
|
}
|
|
1183
1213
|
// The non-physical kinds are validated but are never watch inputs: they name no path, and
|
|
@@ -1185,16 +1215,16 @@ function projectWatchInputs(dependencies) {
|
|
|
1185
1215
|
case "semantic-closure": {
|
|
1186
1216
|
if (!hasExactKeys(dependency, ["digest", "key", "kind", "scopeId"]))
|
|
1187
1217
|
throw new Error("Invalid semantic-closure dependency");
|
|
1188
|
-
string(dependency
|
|
1189
|
-
string(dependency
|
|
1190
|
-
string(dependency
|
|
1218
|
+
string(dependency["scopeId"], "semantic-closure scope ID");
|
|
1219
|
+
string(dependency["key"], "semantic-closure key");
|
|
1220
|
+
string(dependency["digest"], "semantic-closure digest");
|
|
1191
1221
|
break;
|
|
1192
1222
|
}
|
|
1193
1223
|
case "evaluated": {
|
|
1194
1224
|
if (!hasExactKeys(dependency, ["digest", "entryId", "kind"]))
|
|
1195
1225
|
throw new Error("Invalid evaluated dependency");
|
|
1196
|
-
string(dependency
|
|
1197
|
-
string(dependency
|
|
1226
|
+
string(dependency["entryId"], "evaluated entry ID");
|
|
1227
|
+
string(dependency["digest"], "evaluated digest");
|
|
1198
1228
|
break;
|
|
1199
1229
|
}
|
|
1200
1230
|
default:
|
|
@@ -4217,7 +4247,7 @@ function normalizeRelative(value) {
|
|
|
4217
4247
|
return normalized;
|
|
4218
4248
|
}
|
|
4219
4249
|
function trustedBase(last, request) {
|
|
4220
|
-
const published = (manifest) => isRecord2(manifest) && manifest
|
|
4250
|
+
const published = (manifest) => isRecord2(manifest) && manifest["projectId"] === last.projectId && manifest["revision"] === last.revision && manifest["generation"] === last.generation;
|
|
4221
4251
|
const base = request.base;
|
|
4222
4252
|
return isRecord2(base) && published(base.manifest) && published(request.previous) && isRecord2(base.snapshot) && base.snapshot.projectId === last.projectId && base.snapshot.revision === last.revision;
|
|
4223
4253
|
}
|
|
@@ -4231,17 +4261,17 @@ function sameManifestStamp(left, right) {
|
|
|
4231
4261
|
return left.dev === right.dev && left.ino === right.ino && left.size === right.size && left.mtimeNs === right.mtimeNs && left.ctimeNs === right.ctimeNs;
|
|
4232
4262
|
}
|
|
4233
4263
|
function configurationDigest(candidate) {
|
|
4234
|
-
return isRecord2(candidate) && isRecord2(candidate
|
|
4264
|
+
return isRecord2(candidate) && isRecord2(candidate["configuration"]) ? candidate["configuration"]["digest"] : void 0;
|
|
4235
4265
|
}
|
|
4236
4266
|
function unchangedArtifact(artifact, last) {
|
|
4237
|
-
const id = artifact
|
|
4238
|
-
const outputs = artifact
|
|
4239
|
-
if (!string2(artifact
|
|
4267
|
+
const id = artifact["id"];
|
|
4268
|
+
const outputs = artifact["outputs"];
|
|
4269
|
+
if (!string2(artifact["revision"]) || last.revisions.get(id) !== artifact["revision"] || !Array.isArray(outputs) || outputs.length !== (last.counts.get(id) ?? 0))
|
|
4240
4270
|
return false;
|
|
4241
4271
|
return outputs.every((output) => {
|
|
4242
|
-
if (!isRecord2(output) || !string2(output
|
|
4243
|
-
const entry = last.files.get(output
|
|
4244
|
-
return entry?.ownerId === id && entry.digest === output
|
|
4272
|
+
if (!isRecord2(output) || !string2(output["path"])) return false;
|
|
4273
|
+
const entry = last.files.get(output["path"]);
|
|
4274
|
+
return entry?.ownerId === id && entry.digest === output["digest"] && entry.role === output["role"];
|
|
4245
4275
|
});
|
|
4246
4276
|
}
|
|
4247
4277
|
var EMPTY_SCOPE_FACTS = canonicalJson({ definitions: [], references: [] });
|
|
@@ -4424,7 +4454,7 @@ function stringArray(value) {
|
|
|
4424
4454
|
function isIdentity(value) {
|
|
4425
4455
|
if (!isRecord2(value) || !exact(value, ["projectId", "entryId", "role"], ["declarationId", "part"]))
|
|
4426
4456
|
return false;
|
|
4427
|
-
return string2(value
|
|
4457
|
+
return string2(value["projectId"]) && string2(value["entryId"]) && [
|
|
4428
4458
|
"page-shell",
|
|
4429
4459
|
"content",
|
|
4430
4460
|
"demo-assets",
|
|
@@ -4432,7 +4462,7 @@ function isIdentity(value) {
|
|
|
4432
4462
|
"category",
|
|
4433
4463
|
"api-list",
|
|
4434
4464
|
"aggregate"
|
|
4435
|
-
].includes(String(value
|
|
4465
|
+
].includes(String(value["role"])) && (value["declarationId"] === void 0 || string2(value["declarationId"])) && (value["part"] === void 0 || string2(value["part"]));
|
|
4436
4466
|
}
|
|
4437
4467
|
function isFingerprint(value) {
|
|
4438
4468
|
return isRecord2(value) && exact(value, [
|
|
@@ -4442,40 +4472,40 @@ function isFingerprint(value) {
|
|
|
4442
4472
|
"configurationDigest",
|
|
4443
4473
|
"inputDigest",
|
|
4444
4474
|
"keywordDigest"
|
|
4445
|
-
]) && value
|
|
4446
|
-
value
|
|
4447
|
-
value
|
|
4448
|
-
value
|
|
4449
|
-
value
|
|
4450
|
-
value
|
|
4475
|
+
]) && value["schemaVersion"] === SCHEMA_VERSION && [
|
|
4476
|
+
value["compilerVersion"],
|
|
4477
|
+
value["toolchainDigest"],
|
|
4478
|
+
value["configurationDigest"],
|
|
4479
|
+
value["inputDigest"],
|
|
4480
|
+
value["keywordDigest"]
|
|
4451
4481
|
].every(string2);
|
|
4452
4482
|
}
|
|
4453
4483
|
function isDependency(value) {
|
|
4454
|
-
if (!isRecord2(value) || !string2(value
|
|
4455
|
-
if (value
|
|
4456
|
-
return exact(value, ["kind", "path", "digest"]) && string2(value
|
|
4457
|
-
if (value
|
|
4458
|
-
return exact(value, ["kind", "path", "exists"]) && string2(value
|
|
4459
|
-
if (value
|
|
4460
|
-
return exact(value, ["kind", "root", "include", "exclude", "members"]) && string2(value
|
|
4461
|
-
if (value
|
|
4462
|
-
return exact(value, ["kind", "scopeId", "digest", "files", "reason"]) && string2(value
|
|
4463
|
-
if (value
|
|
4464
|
-
return exact(value, ["kind", "scopeId", "digest", "reason"]) && string2(value
|
|
4465
|
-
if (value
|
|
4466
|
-
return exact(value, ["kind", "scopeId", "key", "digest"]) && string2(value
|
|
4467
|
-
if (value
|
|
4468
|
-
return exact(value, ["kind", "entryId", "digest"]) && string2(value
|
|
4469
|
-
return value
|
|
4484
|
+
if (!isRecord2(value) || !string2(value["kind"])) return false;
|
|
4485
|
+
if (value["kind"] === "content")
|
|
4486
|
+
return exact(value, ["kind", "path", "digest"]) && string2(value["path"]) && string2(value["digest"]);
|
|
4487
|
+
if (value["kind"] === "existence")
|
|
4488
|
+
return exact(value, ["kind", "path", "exists"]) && string2(value["path"]) && typeof value["exists"] === "boolean";
|
|
4489
|
+
if (value["kind"] === "glob")
|
|
4490
|
+
return exact(value, ["kind", "root", "include", "exclude", "members"]) && string2(value["root"]) && stringArray(value["include"]) && stringArray(value["exclude"]) && stringArray(value["members"]);
|
|
4491
|
+
if (value["kind"] === "semantic")
|
|
4492
|
+
return exact(value, ["kind", "scopeId", "digest", "files", "reason"]) && string2(value["scopeId"]) && string2(value["digest"]) && stringArray(value["files"]) && string2(value["reason"]);
|
|
4493
|
+
if (value["kind"] === "semantic-reference")
|
|
4494
|
+
return exact(value, ["kind", "scopeId", "digest", "reason"]) && string2(value["scopeId"]) && string2(value["digest"]) && string2(value["reason"]);
|
|
4495
|
+
if (value["kind"] === "semantic-closure")
|
|
4496
|
+
return exact(value, ["kind", "scopeId", "key", "digest"]) && string2(value["scopeId"]) && string2(value["key"]) && string2(value["digest"]);
|
|
4497
|
+
if (value["kind"] === "evaluated")
|
|
4498
|
+
return exact(value, ["kind", "entryId", "digest"]) && string2(value["entryId"]) && string2(value["digest"]);
|
|
4499
|
+
return value["kind"] === "keyword" && exact(value, ["kind", "key", "digest"]) && string2(value["key"]) && string2(value["digest"]);
|
|
4470
4500
|
}
|
|
4471
4501
|
function isKeyword(value) {
|
|
4472
|
-
return isRecord2(value) && exact(value, ["key", "title", "path"], ["type", "languages", "description"]) && string2(value
|
|
4502
|
+
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));
|
|
4473
4503
|
}
|
|
4474
4504
|
function isSource(value) {
|
|
4475
|
-
return isRecord2(value) && exact(value, ["path"], ["line", "column"]) && string2(value
|
|
4505
|
+
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"]));
|
|
4476
4506
|
}
|
|
4477
4507
|
function isDiagnostic(value) {
|
|
4478
|
-
return isRecord2(value) && exact(value, ["code", "severity", "message", "stage"], ["source", "ownerId", "related"]) && string2(value
|
|
4508
|
+
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"]) && [
|
|
4479
4509
|
"discovery",
|
|
4480
4510
|
"evaluation",
|
|
4481
4511
|
"semantic",
|
|
@@ -4484,8 +4514,8 @@ function isDiagnostic(value) {
|
|
|
4484
4514
|
"cache",
|
|
4485
4515
|
"commit",
|
|
4486
4516
|
"host"
|
|
4487
|
-
].includes(String(value
|
|
4488
|
-
(item) => isRecord2(item) && exact(item, ["message", "source"]) && string2(item
|
|
4517
|
+
].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(
|
|
4518
|
+
(item) => isRecord2(item) && exact(item, ["message", "source"]) && string2(item["message"]) && isSource(item["source"])
|
|
4489
4519
|
));
|
|
4490
4520
|
}
|
|
4491
4521
|
function isSearch(value) {
|
|
@@ -4493,17 +4523,17 @@ function isSearch(value) {
|
|
|
4493
4523
|
value,
|
|
4494
4524
|
["breadcrumbs", "pageType", "title", "section", "route", "content"],
|
|
4495
4525
|
["fragment", "kind", "signature", "description"]
|
|
4496
|
-
) && stringArray(value
|
|
4526
|
+
) && 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(
|
|
4497
4527
|
(item) => item === void 0 || string2(item)
|
|
4498
4528
|
);
|
|
4499
4529
|
}
|
|
4500
4530
|
function isAnchor(value) {
|
|
4501
|
-
return isRecord2(value) && exact(value, ["anchorId", "anchor", "title", "type"], ["scope"]) && [value
|
|
4531
|
+
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"]));
|
|
4502
4532
|
}
|
|
4503
4533
|
function isLinkedContent(value) {
|
|
4504
|
-
if (!isRecord2(value) || !exact(value, ["ir", "html", "searchRecords", "keywordDigest"]) || !string2(value
|
|
4534
|
+
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"]))
|
|
4505
4535
|
return false;
|
|
4506
|
-
const ir = value
|
|
4536
|
+
const ir = value["ir"];
|
|
4507
4537
|
return exact(
|
|
4508
4538
|
ir,
|
|
4509
4539
|
[
|
|
@@ -4522,7 +4552,9 @@ function isLinkedContent(value) {
|
|
|
4522
4552
|
"diagnostics"
|
|
4523
4553
|
],
|
|
4524
4554
|
["icon", "searchBreadcrumbs"]
|
|
4525
|
-
) && ir
|
|
4555
|
+
) && ir["schemaVersion"] === SCHEMA_VERSION && [ir["id"], ir["entryId"], ir["title"], ir["route"], ir["absoluteRoute"], ir["html"]].every(
|
|
4556
|
+
string2
|
|
4557
|
+
) && ["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);
|
|
4526
4558
|
}
|
|
4527
4559
|
function isRoute(value) {
|
|
4528
4560
|
return isRecord2(value) && exact(
|
|
@@ -4536,23 +4568,31 @@ function isRoute(value) {
|
|
|
4536
4568
|
"metadata",
|
|
4537
4569
|
"category",
|
|
4538
4570
|
"modulePath",
|
|
4539
|
-
"apiListSegment"
|
|
4571
|
+
"apiListSegment",
|
|
4572
|
+
"demoModulePath",
|
|
4573
|
+
"demoNames",
|
|
4574
|
+
"playgroundPages"
|
|
4540
4575
|
]
|
|
4541
|
-
) && [value
|
|
4576
|
+
) && [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"));
|
|
4542
4577
|
}
|
|
4543
4578
|
function isApiList(value) {
|
|
4544
4579
|
return isRecord2(value) && exact(
|
|
4545
4580
|
value,
|
|
4546
4581
|
["apiEntryId", "scopeId", "scopeTitle", "name", "type", "route"],
|
|
4547
4582
|
["description", "signature"]
|
|
4548
|
-
) && [
|
|
4549
|
-
|
|
4550
|
-
|
|
4583
|
+
) && [
|
|
4584
|
+
value["apiEntryId"],
|
|
4585
|
+
value["scopeId"],
|
|
4586
|
+
value["scopeTitle"],
|
|
4587
|
+
value["name"],
|
|
4588
|
+
value["type"],
|
|
4589
|
+
value["route"]
|
|
4590
|
+
].every(string2) && [value["description"], value["signature"]].every((item) => item === void 0 || string2(item));
|
|
4551
4591
|
}
|
|
4552
4592
|
function isFileOutput(value) {
|
|
4553
|
-
return isRecord2(value) && exact(value, ["path", "role", "encoding", "content", "digest"]) && string2(value
|
|
4554
|
-
String(value
|
|
4555
|
-
) && ["utf8", "base64"].includes(String(value
|
|
4593
|
+
return isRecord2(value) && exact(value, ["path", "role", "encoding", "content", "digest"]) && string2(value["path"]) && ["angular", "content", "asset", "routes", "context", "search", "api-list"].includes(
|
|
4594
|
+
String(value["role"])
|
|
4595
|
+
) && ["utf8", "base64"].includes(String(value["encoding"])) && string2(value["content"]) && string2(value["digest"]);
|
|
4556
4596
|
}
|
|
4557
4597
|
function isContentDescriptor(value) {
|
|
4558
4598
|
if (!isRecord2(value) || !exact(
|
|
@@ -4576,23 +4616,23 @@ function isContentDescriptor(value) {
|
|
|
4576
4616
|
["icon", "keyword"]
|
|
4577
4617
|
))
|
|
4578
4618
|
return false;
|
|
4579
|
-
if (value
|
|
4580
|
-
value
|
|
4581
|
-
value
|
|
4582
|
-
value
|
|
4583
|
-
value
|
|
4584
|
-
value
|
|
4585
|
-
value
|
|
4586
|
-
value
|
|
4587
|
-
].every(string2) || ![value
|
|
4619
|
+
if (value["schemaVersion"] !== SCHEMA_VERSION || ![
|
|
4620
|
+
value["id"],
|
|
4621
|
+
value["ownerId"],
|
|
4622
|
+
value["title"],
|
|
4623
|
+
value["route"],
|
|
4624
|
+
value["absoluteRoute"],
|
|
4625
|
+
value["inputDigest"],
|
|
4626
|
+
value["requestDigest"]
|
|
4627
|
+
].every(string2) || ![value["id"], value["ownerId"], value["inputDigest"], value["requestDigest"]].every(
|
|
4588
4628
|
(item) => string2(item) && item.length > 0 && !item.includes("\0")
|
|
4589
|
-
) || !finite(value
|
|
4629
|
+
) || !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"]))
|
|
4590
4630
|
return false;
|
|
4591
|
-
const locator = value
|
|
4592
|
-
return value
|
|
4631
|
+
const locator = value["locator"];
|
|
4632
|
+
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"]);
|
|
4593
4633
|
}
|
|
4594
4634
|
function isPhysicalDescriptorDependency(value) {
|
|
4595
|
-
return isRecord2(value) && (value
|
|
4635
|
+
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");
|
|
4596
4636
|
}
|
|
4597
4637
|
function validDescriptorPlan(artifact) {
|
|
4598
4638
|
const descriptors = artifact.contentDescriptors;
|
|
@@ -4677,7 +4717,7 @@ function isPageArtifact(value) {
|
|
|
4677
4717
|
"diagnostics"
|
|
4678
4718
|
],
|
|
4679
4719
|
["contentDescriptors"]
|
|
4680
|
-
) && string2(value
|
|
4720
|
+
) && 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);
|
|
4681
4721
|
}
|
|
4682
4722
|
function isJsonTree(value, ancestors = /* @__PURE__ */ new WeakSet()) {
|
|
4683
4723
|
if (value === null || string2(value) || typeof value === "boolean") return true;
|
|
@@ -4712,19 +4752,19 @@ function validOutputDigest(output) {
|
|
|
4712
4752
|
}
|
|
4713
4753
|
}
|
|
4714
4754
|
function isPublishedGeneratorConfiguration(value) {
|
|
4715
|
-
return isJsonTree(value) && isRecord2(value) && exact(value, ["outputRoot", "cacheRoot", "assetDirectory", "themes", "digest"]) && [value
|
|
4755
|
+
return isJsonTree(value) && isRecord2(value) && exact(value, ["outputRoot", "cacheRoot", "assetDirectory", "themes", "digest"]) && [value["outputRoot"], value["cacheRoot"]].every(
|
|
4716
4756
|
(item) => string2(item) && path6.isAbsolute(item) && path6.resolve(item).replace(/\\/g, "/") === item && !item.includes("\0")
|
|
4717
|
-
) && string2(value
|
|
4757
|
+
) && 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"]);
|
|
4718
4758
|
}
|
|
4719
4759
|
function isArtifactSnapshotShape(value) {
|
|
4720
4760
|
return isJsonTree(value) && isRecord2(value) && exact(
|
|
4721
4761
|
value,
|
|
4722
4762
|
["projectId", "revision", "artifacts", "globalKeywords", "remoteKeywords"],
|
|
4723
4763
|
["configuration"]
|
|
4724
|
-
) && (value
|
|
4764
|
+
) && (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);
|
|
4725
4765
|
}
|
|
4726
4766
|
function isRemoteKeywords(remote) {
|
|
4727
|
-
return isRecord2(remote) && exact(remote, ["loaderId", "digest", "keywords"], ["validator"]) && string2(remote
|
|
4767
|
+
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"]));
|
|
4728
4768
|
}
|
|
4729
4769
|
function isSnapshotEnvelope(value) {
|
|
4730
4770
|
if (!isRecord2(value) || Object.getPrototypeOf(value) !== Object.prototype) return false;
|
|
@@ -4735,7 +4775,7 @@ function isSnapshotEnvelope(value) {
|
|
|
4735
4775
|
return descriptor?.enumerable === true && "value" in descriptor;
|
|
4736
4776
|
}))
|
|
4737
4777
|
return false;
|
|
4738
|
-
const artifacts = value
|
|
4778
|
+
const artifacts = value["artifacts"];
|
|
4739
4779
|
if (!Array.isArray(artifacts) || Object.getPrototypeOf(artifacts) !== Array.prototype || Reflect.ownKeys(artifacts).length !== artifacts.length + 1)
|
|
4740
4780
|
return false;
|
|
4741
4781
|
for (let index = 0; index < artifacts.length; index += 1)
|
|
@@ -4744,14 +4784,14 @@ function isSnapshotEnvelope(value) {
|
|
|
4744
4784
|
value,
|
|
4745
4785
|
["projectId", "revision", "artifacts", "globalKeywords", "remoteKeywords"],
|
|
4746
4786
|
["configuration"]
|
|
4747
|
-
) && (value
|
|
4787
|
+
) && (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);
|
|
4748
4788
|
}
|
|
4749
4789
|
function isOutputManifest(value) {
|
|
4750
|
-
return isJsonTree(value) && isRecord2(value) && exact(value, ["schemaVersion", "projectId", "generation", "revision", "files"]) && value
|
|
4751
|
-
(file) => isRecord2(file) && exact(file, ["path", "ownerId", "digest", "role"]) && string2(file
|
|
4752
|
-
String(file
|
|
4790
|
+
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(
|
|
4791
|
+
(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(
|
|
4792
|
+
String(file["role"])
|
|
4753
4793
|
)
|
|
4754
|
-
) && new Set(value
|
|
4794
|
+
) && new Set(value["files"].map((file) => file.path)).size === value["files"].length;
|
|
4755
4795
|
}
|
|
4756
4796
|
function safeRelative(value) {
|
|
4757
4797
|
try {
|
|
@@ -4890,7 +4930,7 @@ function createCandidateOutputCommitter(options = {}, host = {}) {
|
|
|
4890
4930
|
|
|
4891
4931
|
// libs/builder/generator/bootstrap/constants.ts
|
|
4892
4932
|
var GENERATOR_COMPILER_VERSION = "0.0.1";
|
|
4893
|
-
var GENERATOR_TOOLCHAIN_DIGEST = "
|
|
4933
|
+
var GENERATOR_TOOLCHAIN_DIGEST = "495b74972f5c2d99ad311bd24b03e2560f77343e401abd7c4d8185e4fee96764";
|
|
4894
4934
|
|
|
4895
4935
|
// libs/builder/generator/bootstrap/index.ts
|
|
4896
4936
|
var PERSISTENT_WORKER_ENV = PERSISTENT_WORKER_FLAG;
|
|
@@ -14,7 +14,7 @@ export interface WindowsSpawnPlan {
|
|
|
14
14
|
export interface WindowsCommandOptions {
|
|
15
15
|
readonly cwd: string;
|
|
16
16
|
readonly env: NodeJS.ProcessEnv;
|
|
17
|
-
/** The Node that starts `ng`, `npm
|
|
17
|
+
/** The Node that starts `ng`, `npm`, `npx` and Corepack's pnpm; `process.execPath` by default. */
|
|
18
18
|
readonly execPath?: string;
|
|
19
19
|
/** @internal Test port. */
|
|
20
20
|
readonly isFile?: (file: string) => boolean;
|
|
@@ -33,9 +33,10 @@ export declare function resolveWindowsCommand(command: string, options: WindowsC
|
|
|
33
33
|
*/
|
|
34
34
|
export declare function quoteWindowsArgument(value: string, twice?: boolean): string;
|
|
35
35
|
/**
|
|
36
|
-
* The JavaScript entry of `ng`, `npm` or `
|
|
37
|
-
* project (the nearest `node_modules/@angular/cli` above `cwd`),
|
|
38
|
-
* (the Windows Node layout)
|
|
36
|
+
* The JavaScript entry of `ng`, `npm`, `npx`, `pnpm` or `pnpx` given as a bare name: the Angular
|
|
37
|
+
* CLI of the project (the nearest `node_modules/@angular/cli` above `cwd`), the npm beside
|
|
38
|
+
* `execPath` (the Windows Node layout), and Corepack's pnpm beside `execPath` when the command
|
|
39
|
+
* resolves to Corepack's shim there. Undefined for any other command, or when the entry is missing.
|
|
39
40
|
*/
|
|
40
41
|
export declare function nodeEntry(command: string, options: WindowsCommandOptions): string | undefined;
|
|
41
42
|
export declare function windowsSpawnPlan(command: string, args: readonly string[], options: WindowsCommandOptions): WindowsSpawnPlan;
|