@ng-doc/builder 22.1.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/generator/bootstrap/bin.js +150 -107
- package/generator/bootstrap/cli.js +150 -107
- package/generator/bootstrap/index.js +125 -99
- package/generator/bootstrap/process-tree.d.ts +5 -4
- package/generator/build-metafile.json +177 -78
- package/generator/build-provenance.json +3 -3
- package/generator/compiler/index.js +689 -484
- package/generator/content/html-worker.js +8 -0
- package/generator/contracts.d.ts +20 -2
- package/generator/kernel/flags.d.ts +3 -0
- package/generator/outputs/index.d.ts +22 -6
- package/generator/templates/demo-routes.ts.nunj +21 -1
- package/generator/templates/page.ts.nunj +5 -1
- package/generator/vite/angular/analog-provenance.json +1 -1
- package/generator/vite/angular-composition.d.ts +25 -1
- package/generator/vite/content-updates.d.ts +62 -0
- package/generator/vite/host-updates.d.ts +85 -5
- package/generator/vite/index.js +621 -243
- package/generator/vite/lifecycle.d.ts +39 -2
- 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/interfaces/configuration.d.ts +11 -3
- package/package.json +4 -4
- package/templates/demo-routes.ts.nunj +21 -1
- package/templates/page.ts.nunj +5 -1
|
@@ -14,7 +14,10 @@ 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";
|
|
@@ -89,6 +92,21 @@ var FLAGS = Object.freeze(
|
|
|
89
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.",
|
|
90
93
|
verify: false
|
|
91
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
|
+
},
|
|
92
110
|
{
|
|
93
111
|
name: VITE_BUILD_HANDOFF_FLAG,
|
|
94
112
|
description: "The server build of the Vite production pipeline publishes the browser build's generation instead of generating again.",
|
|
@@ -1135,29 +1153,29 @@ function projectWatchInputs(dependencies) {
|
|
|
1135
1153
|
const scopes = /* @__PURE__ */ new Map();
|
|
1136
1154
|
const references = [];
|
|
1137
1155
|
for (const dependency of dependencies) {
|
|
1138
|
-
if (!isRecord(dependency) || typeof dependency
|
|
1156
|
+
if (!isRecord(dependency) || typeof dependency["kind"] !== "string")
|
|
1139
1157
|
throw new Error("Invalid dependency");
|
|
1140
|
-
switch (dependency
|
|
1158
|
+
switch (dependency["kind"]) {
|
|
1141
1159
|
case "content": {
|
|
1142
1160
|
if (!hasExactKeys(dependency, ["digest", "kind", "path"]))
|
|
1143
1161
|
throw new Error("Invalid content dependency");
|
|
1144
|
-
files.add(path4(dependency
|
|
1145
|
-
string(dependency
|
|
1162
|
+
files.add(path4(dependency["path"], "content path"));
|
|
1163
|
+
string(dependency["digest"], "content digest");
|
|
1146
1164
|
break;
|
|
1147
1165
|
}
|
|
1148
1166
|
case "existence": {
|
|
1149
|
-
if (!hasExactKeys(dependency, ["exists", "kind", "path"]) || typeof dependency
|
|
1167
|
+
if (!hasExactKeys(dependency, ["exists", "kind", "path"]) || typeof dependency["exists"] !== "boolean")
|
|
1150
1168
|
throw new Error("Invalid existence dependency");
|
|
1151
|
-
files.add(path4(dependency
|
|
1169
|
+
files.add(path4(dependency["path"], "existence path"));
|
|
1152
1170
|
break;
|
|
1153
1171
|
}
|
|
1154
1172
|
case "glob": {
|
|
1155
1173
|
if (!hasExactKeys(dependency, ["exclude", "include", "kind", "members", "root"]))
|
|
1156
1174
|
throw new Error("Invalid glob dependency");
|
|
1157
|
-
const root = path4(dependency
|
|
1158
|
-
const include = strings(dependency
|
|
1159
|
-
const exclude = strings(dependency
|
|
1160
|
-
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));
|
|
1161
1179
|
const glob = { root, include, exclude };
|
|
1162
1180
|
globs.set(JSON.stringify(glob), glob);
|
|
1163
1181
|
break;
|
|
@@ -1165,10 +1183,10 @@ function projectWatchInputs(dependencies) {
|
|
|
1165
1183
|
case "semantic": {
|
|
1166
1184
|
if (!hasExactKeys(dependency, ["digest", "files", "kind", "reason", "scopeId"]))
|
|
1167
1185
|
throw new Error("Invalid semantic dependency");
|
|
1168
|
-
const scopeId = string(dependency
|
|
1169
|
-
const digest = string(dependency
|
|
1170
|
-
string(dependency
|
|
1171
|
-
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");
|
|
1172
1190
|
scopeFiles.forEach((file) => files.add(file));
|
|
1173
1191
|
const registered = scopes.get(scopeId) ?? [];
|
|
1174
1192
|
registered.push({ digest });
|
|
@@ -1179,17 +1197,17 @@ function projectWatchInputs(dependencies) {
|
|
|
1179
1197
|
if (!hasExactKeys(dependency, ["digest", "kind", "reason", "scopeId"]))
|
|
1180
1198
|
throw new Error("Invalid semantic-reference dependency");
|
|
1181
1199
|
references.push({
|
|
1182
|
-
scopeId: string(dependency
|
|
1183
|
-
digest: string(dependency
|
|
1200
|
+
scopeId: string(dependency["scopeId"], "semantic-reference scope ID"),
|
|
1201
|
+
digest: string(dependency["digest"], "semantic-reference digest")
|
|
1184
1202
|
});
|
|
1185
|
-
string(dependency
|
|
1203
|
+
string(dependency["reason"], "semantic-reference reason");
|
|
1186
1204
|
break;
|
|
1187
1205
|
}
|
|
1188
1206
|
case "keyword": {
|
|
1189
1207
|
if (!hasExactKeys(dependency, ["digest", "key", "kind"]))
|
|
1190
1208
|
throw new Error("Invalid keyword dependency");
|
|
1191
|
-
string(dependency
|
|
1192
|
-
string(dependency
|
|
1209
|
+
string(dependency["key"], "keyword key");
|
|
1210
|
+
string(dependency["digest"], "keyword digest");
|
|
1193
1211
|
break;
|
|
1194
1212
|
}
|
|
1195
1213
|
// The non-physical kinds are validated but are never watch inputs: they name no path, and
|
|
@@ -1197,16 +1215,16 @@ function projectWatchInputs(dependencies) {
|
|
|
1197
1215
|
case "semantic-closure": {
|
|
1198
1216
|
if (!hasExactKeys(dependency, ["digest", "key", "kind", "scopeId"]))
|
|
1199
1217
|
throw new Error("Invalid semantic-closure dependency");
|
|
1200
|
-
string(dependency
|
|
1201
|
-
string(dependency
|
|
1202
|
-
string(dependency
|
|
1218
|
+
string(dependency["scopeId"], "semantic-closure scope ID");
|
|
1219
|
+
string(dependency["key"], "semantic-closure key");
|
|
1220
|
+
string(dependency["digest"], "semantic-closure digest");
|
|
1203
1221
|
break;
|
|
1204
1222
|
}
|
|
1205
1223
|
case "evaluated": {
|
|
1206
1224
|
if (!hasExactKeys(dependency, ["digest", "entryId", "kind"]))
|
|
1207
1225
|
throw new Error("Invalid evaluated dependency");
|
|
1208
|
-
string(dependency
|
|
1209
|
-
string(dependency
|
|
1226
|
+
string(dependency["entryId"], "evaluated entry ID");
|
|
1227
|
+
string(dependency["digest"], "evaluated digest");
|
|
1210
1228
|
break;
|
|
1211
1229
|
}
|
|
1212
1230
|
default:
|
|
@@ -4229,7 +4247,7 @@ function normalizeRelative(value) {
|
|
|
4229
4247
|
return normalized;
|
|
4230
4248
|
}
|
|
4231
4249
|
function trustedBase(last, request) {
|
|
4232
|
-
const published = (manifest) => isRecord2(manifest) && manifest
|
|
4250
|
+
const published = (manifest) => isRecord2(manifest) && manifest["projectId"] === last.projectId && manifest["revision"] === last.revision && manifest["generation"] === last.generation;
|
|
4233
4251
|
const base = request.base;
|
|
4234
4252
|
return isRecord2(base) && published(base.manifest) && published(request.previous) && isRecord2(base.snapshot) && base.snapshot.projectId === last.projectId && base.snapshot.revision === last.revision;
|
|
4235
4253
|
}
|
|
@@ -4243,17 +4261,17 @@ function sameManifestStamp(left, right) {
|
|
|
4243
4261
|
return left.dev === right.dev && left.ino === right.ino && left.size === right.size && left.mtimeNs === right.mtimeNs && left.ctimeNs === right.ctimeNs;
|
|
4244
4262
|
}
|
|
4245
4263
|
function configurationDigest(candidate) {
|
|
4246
|
-
return isRecord2(candidate) && isRecord2(candidate
|
|
4264
|
+
return isRecord2(candidate) && isRecord2(candidate["configuration"]) ? candidate["configuration"]["digest"] : void 0;
|
|
4247
4265
|
}
|
|
4248
4266
|
function unchangedArtifact(artifact, last) {
|
|
4249
|
-
const id = artifact
|
|
4250
|
-
const outputs = artifact
|
|
4251
|
-
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))
|
|
4252
4270
|
return false;
|
|
4253
4271
|
return outputs.every((output) => {
|
|
4254
|
-
if (!isRecord2(output) || !string2(output
|
|
4255
|
-
const entry = last.files.get(output
|
|
4256
|
-
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"];
|
|
4257
4275
|
});
|
|
4258
4276
|
}
|
|
4259
4277
|
var EMPTY_SCOPE_FACTS = canonicalJson({ definitions: [], references: [] });
|
|
@@ -4436,7 +4454,7 @@ function stringArray(value) {
|
|
|
4436
4454
|
function isIdentity(value) {
|
|
4437
4455
|
if (!isRecord2(value) || !exact(value, ["projectId", "entryId", "role"], ["declarationId", "part"]))
|
|
4438
4456
|
return false;
|
|
4439
|
-
return string2(value
|
|
4457
|
+
return string2(value["projectId"]) && string2(value["entryId"]) && [
|
|
4440
4458
|
"page-shell",
|
|
4441
4459
|
"content",
|
|
4442
4460
|
"demo-assets",
|
|
@@ -4444,7 +4462,7 @@ function isIdentity(value) {
|
|
|
4444
4462
|
"category",
|
|
4445
4463
|
"api-list",
|
|
4446
4464
|
"aggregate"
|
|
4447
|
-
].includes(String(value
|
|
4465
|
+
].includes(String(value["role"])) && (value["declarationId"] === void 0 || string2(value["declarationId"])) && (value["part"] === void 0 || string2(value["part"]));
|
|
4448
4466
|
}
|
|
4449
4467
|
function isFingerprint(value) {
|
|
4450
4468
|
return isRecord2(value) && exact(value, [
|
|
@@ -4454,40 +4472,40 @@ function isFingerprint(value) {
|
|
|
4454
4472
|
"configurationDigest",
|
|
4455
4473
|
"inputDigest",
|
|
4456
4474
|
"keywordDigest"
|
|
4457
|
-
]) && value
|
|
4458
|
-
value
|
|
4459
|
-
value
|
|
4460
|
-
value
|
|
4461
|
-
value
|
|
4462
|
-
value
|
|
4475
|
+
]) && value["schemaVersion"] === SCHEMA_VERSION && [
|
|
4476
|
+
value["compilerVersion"],
|
|
4477
|
+
value["toolchainDigest"],
|
|
4478
|
+
value["configurationDigest"],
|
|
4479
|
+
value["inputDigest"],
|
|
4480
|
+
value["keywordDigest"]
|
|
4463
4481
|
].every(string2);
|
|
4464
4482
|
}
|
|
4465
4483
|
function isDependency(value) {
|
|
4466
|
-
if (!isRecord2(value) || !string2(value
|
|
4467
|
-
if (value
|
|
4468
|
-
return exact(value, ["kind", "path", "digest"]) && string2(value
|
|
4469
|
-
if (value
|
|
4470
|
-
return exact(value, ["kind", "path", "exists"]) && string2(value
|
|
4471
|
-
if (value
|
|
4472
|
-
return exact(value, ["kind", "root", "include", "exclude", "members"]) && string2(value
|
|
4473
|
-
if (value
|
|
4474
|
-
return exact(value, ["kind", "scopeId", "digest", "files", "reason"]) && string2(value
|
|
4475
|
-
if (value
|
|
4476
|
-
return exact(value, ["kind", "scopeId", "digest", "reason"]) && string2(value
|
|
4477
|
-
if (value
|
|
4478
|
-
return exact(value, ["kind", "scopeId", "key", "digest"]) && string2(value
|
|
4479
|
-
if (value
|
|
4480
|
-
return exact(value, ["kind", "entryId", "digest"]) && string2(value
|
|
4481
|
-
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"]);
|
|
4482
4500
|
}
|
|
4483
4501
|
function isKeyword(value) {
|
|
4484
|
-
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));
|
|
4485
4503
|
}
|
|
4486
4504
|
function isSource(value) {
|
|
4487
|
-
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"]));
|
|
4488
4506
|
}
|
|
4489
4507
|
function isDiagnostic(value) {
|
|
4490
|
-
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"]) && [
|
|
4491
4509
|
"discovery",
|
|
4492
4510
|
"evaluation",
|
|
4493
4511
|
"semantic",
|
|
@@ -4496,8 +4514,8 @@ function isDiagnostic(value) {
|
|
|
4496
4514
|
"cache",
|
|
4497
4515
|
"commit",
|
|
4498
4516
|
"host"
|
|
4499
|
-
].includes(String(value
|
|
4500
|
-
(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"])
|
|
4501
4519
|
));
|
|
4502
4520
|
}
|
|
4503
4521
|
function isSearch(value) {
|
|
@@ -4505,17 +4523,17 @@ function isSearch(value) {
|
|
|
4505
4523
|
value,
|
|
4506
4524
|
["breadcrumbs", "pageType", "title", "section", "route", "content"],
|
|
4507
4525
|
["fragment", "kind", "signature", "description"]
|
|
4508
|
-
) && 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(
|
|
4509
4527
|
(item) => item === void 0 || string2(item)
|
|
4510
4528
|
);
|
|
4511
4529
|
}
|
|
4512
4530
|
function isAnchor(value) {
|
|
4513
|
-
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"]));
|
|
4514
4532
|
}
|
|
4515
4533
|
function isLinkedContent(value) {
|
|
4516
|
-
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"]))
|
|
4517
4535
|
return false;
|
|
4518
|
-
const ir = value
|
|
4536
|
+
const ir = value["ir"];
|
|
4519
4537
|
return exact(
|
|
4520
4538
|
ir,
|
|
4521
4539
|
[
|
|
@@ -4534,7 +4552,9 @@ function isLinkedContent(value) {
|
|
|
4534
4552
|
"diagnostics"
|
|
4535
4553
|
],
|
|
4536
4554
|
["icon", "searchBreadcrumbs"]
|
|
4537
|
-
) && 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);
|
|
4538
4558
|
}
|
|
4539
4559
|
function isRoute(value) {
|
|
4540
4560
|
return isRecord2(value) && exact(
|
|
@@ -4550,23 +4570,29 @@ function isRoute(value) {
|
|
|
4550
4570
|
"modulePath",
|
|
4551
4571
|
"apiListSegment",
|
|
4552
4572
|
"demoModulePath",
|
|
4553
|
-
"demoNames"
|
|
4573
|
+
"demoNames",
|
|
4574
|
+
"playgroundPages"
|
|
4554
4575
|
]
|
|
4555
|
-
) && [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"));
|
|
4556
4577
|
}
|
|
4557
4578
|
function isApiList(value) {
|
|
4558
4579
|
return isRecord2(value) && exact(
|
|
4559
4580
|
value,
|
|
4560
4581
|
["apiEntryId", "scopeId", "scopeTitle", "name", "type", "route"],
|
|
4561
4582
|
["description", "signature"]
|
|
4562
|
-
) && [
|
|
4563
|
-
|
|
4564
|
-
|
|
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));
|
|
4565
4591
|
}
|
|
4566
4592
|
function isFileOutput(value) {
|
|
4567
|
-
return isRecord2(value) && exact(value, ["path", "role", "encoding", "content", "digest"]) && string2(value
|
|
4568
|
-
String(value
|
|
4569
|
-
) && ["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"]);
|
|
4570
4596
|
}
|
|
4571
4597
|
function isContentDescriptor(value) {
|
|
4572
4598
|
if (!isRecord2(value) || !exact(
|
|
@@ -4590,23 +4616,23 @@ function isContentDescriptor(value) {
|
|
|
4590
4616
|
["icon", "keyword"]
|
|
4591
4617
|
))
|
|
4592
4618
|
return false;
|
|
4593
|
-
if (value
|
|
4594
|
-
value
|
|
4595
|
-
value
|
|
4596
|
-
value
|
|
4597
|
-
value
|
|
4598
|
-
value
|
|
4599
|
-
value
|
|
4600
|
-
value
|
|
4601
|
-
].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(
|
|
4602
4628
|
(item) => string2(item) && item.length > 0 && !item.includes("\0")
|
|
4603
|
-
) || !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"]))
|
|
4604
4630
|
return false;
|
|
4605
|
-
const locator = value
|
|
4606
|
-
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"]);
|
|
4607
4633
|
}
|
|
4608
4634
|
function isPhysicalDescriptorDependency(value) {
|
|
4609
|
-
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");
|
|
4610
4636
|
}
|
|
4611
4637
|
function validDescriptorPlan(artifact) {
|
|
4612
4638
|
const descriptors = artifact.contentDescriptors;
|
|
@@ -4691,7 +4717,7 @@ function isPageArtifact(value) {
|
|
|
4691
4717
|
"diagnostics"
|
|
4692
4718
|
],
|
|
4693
4719
|
["contentDescriptors"]
|
|
4694
|
-
) && 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);
|
|
4695
4721
|
}
|
|
4696
4722
|
function isJsonTree(value, ancestors = /* @__PURE__ */ new WeakSet()) {
|
|
4697
4723
|
if (value === null || string2(value) || typeof value === "boolean") return true;
|
|
@@ -4726,19 +4752,19 @@ function validOutputDigest(output) {
|
|
|
4726
4752
|
}
|
|
4727
4753
|
}
|
|
4728
4754
|
function isPublishedGeneratorConfiguration(value) {
|
|
4729
|
-
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(
|
|
4730
4756
|
(item) => string2(item) && path6.isAbsolute(item) && path6.resolve(item).replace(/\\/g, "/") === item && !item.includes("\0")
|
|
4731
|
-
) && 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"]);
|
|
4732
4758
|
}
|
|
4733
4759
|
function isArtifactSnapshotShape(value) {
|
|
4734
4760
|
return isJsonTree(value) && isRecord2(value) && exact(
|
|
4735
4761
|
value,
|
|
4736
4762
|
["projectId", "revision", "artifacts", "globalKeywords", "remoteKeywords"],
|
|
4737
4763
|
["configuration"]
|
|
4738
|
-
) && (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);
|
|
4739
4765
|
}
|
|
4740
4766
|
function isRemoteKeywords(remote) {
|
|
4741
|
-
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"]));
|
|
4742
4768
|
}
|
|
4743
4769
|
function isSnapshotEnvelope(value) {
|
|
4744
4770
|
if (!isRecord2(value) || Object.getPrototypeOf(value) !== Object.prototype) return false;
|
|
@@ -4749,7 +4775,7 @@ function isSnapshotEnvelope(value) {
|
|
|
4749
4775
|
return descriptor?.enumerable === true && "value" in descriptor;
|
|
4750
4776
|
}))
|
|
4751
4777
|
return false;
|
|
4752
|
-
const artifacts = value
|
|
4778
|
+
const artifacts = value["artifacts"];
|
|
4753
4779
|
if (!Array.isArray(artifacts) || Object.getPrototypeOf(artifacts) !== Array.prototype || Reflect.ownKeys(artifacts).length !== artifacts.length + 1)
|
|
4754
4780
|
return false;
|
|
4755
4781
|
for (let index = 0; index < artifacts.length; index += 1)
|
|
@@ -4758,14 +4784,14 @@ function isSnapshotEnvelope(value) {
|
|
|
4758
4784
|
value,
|
|
4759
4785
|
["projectId", "revision", "artifacts", "globalKeywords", "remoteKeywords"],
|
|
4760
4786
|
["configuration"]
|
|
4761
|
-
) && (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);
|
|
4762
4788
|
}
|
|
4763
4789
|
function isOutputManifest(value) {
|
|
4764
|
-
return isJsonTree(value) && isRecord2(value) && exact(value, ["schemaVersion", "projectId", "generation", "revision", "files"]) && value
|
|
4765
|
-
(file) => isRecord2(file) && exact(file, ["path", "ownerId", "digest", "role"]) && string2(file
|
|
4766
|
-
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"])
|
|
4767
4793
|
)
|
|
4768
|
-
) && new Set(value
|
|
4794
|
+
) && new Set(value["files"].map((file) => file.path)).size === value["files"].length;
|
|
4769
4795
|
}
|
|
4770
4796
|
function safeRelative(value) {
|
|
4771
4797
|
try {
|
|
@@ -4904,7 +4930,7 @@ function createCandidateOutputCommitter(options = {}, host = {}) {
|
|
|
4904
4930
|
|
|
4905
4931
|
// libs/builder/generator/bootstrap/constants.ts
|
|
4906
4932
|
var GENERATOR_COMPILER_VERSION = "0.0.1";
|
|
4907
|
-
var GENERATOR_TOOLCHAIN_DIGEST = "
|
|
4933
|
+
var GENERATOR_TOOLCHAIN_DIGEST = "495b74972f5c2d99ad311bd24b03e2560f77343e401abd7c4d8185e4fee96764";
|
|
4908
4934
|
|
|
4909
4935
|
// libs/builder/generator/bootstrap/index.ts
|
|
4910
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;
|