@cyaxis/ulvia 1.0.18 → 1.0.20
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/INSTALLATION.md +1 -1
- package/README.md +7 -6
- package/SHARED-HOSTING.md +3 -2
- package/dist/index.js +244 -113
- package/dist/stack-release.json +1 -1
- package/package.json +1 -1
package/INSTALLATION.md
CHANGED
|
@@ -25,7 +25,7 @@ bun --version
|
|
|
25
25
|
Install the chosen compatible CLI release with
|
|
26
26
|
`bun add --global @cyaxis/ulvia@CLI_VERSION`, replacing `CLI_VERSION` with its
|
|
27
27
|
exact version. Workspace contributors can use `bun run ulvia --` instead;
|
|
28
|
-
see [development](https://github.com/matthias-bernouy/CMS/blob/
|
|
28
|
+
see [development](https://github.com/matthias-bernouy/CMS/blob/b028b22aaecf33f088a238292cb1a727f95a3cdf/docs/development/README.md).
|
|
29
29
|
|
|
30
30
|
## 2. Start a local installation
|
|
31
31
|
|
package/README.md
CHANGED
|
@@ -107,15 +107,16 @@ backup of database, files and credentials before destructive recovery.
|
|
|
107
107
|
|
|
108
108
|
## Repository account connections and releases
|
|
109
109
|
|
|
110
|
-
`repository login URL`
|
|
111
|
-
`ULVIA_REPOSITORY_TOKEN
|
|
112
|
-
|
|
110
|
+
`repository login URL` prompts for a CMS PAT with terminal input hidden when
|
|
111
|
+
`ULVIA_REPOSITORY_TOKEN` is absent. Automation can use `--token-stdin` or
|
|
112
|
+
`ULVIA_REPOSITORY_TOKEN`. The saved PAT is pinned to the origin and Repository
|
|
113
|
+
identity. Ordinary Repository accounts can claim namespaces and publish. Logout removes the local
|
|
113
114
|
connection without revoking the remote token. Client configuration uses
|
|
114
115
|
`$XDG_CONFIG_HOME/ulvia`, `~/.config/ulvia` or explicit `ULVIA_CONFIG_DIR`;
|
|
115
116
|
`ULVIA_DATA_DIR` alone isolates it under `<data>/config`. Files are private.
|
|
116
117
|
|
|
117
118
|
```bash
|
|
118
|
-
ulvia repository login https://repository.example.com
|
|
119
|
+
ulvia repository login https://repository.example.com
|
|
119
120
|
ulvia namespace claim example
|
|
120
121
|
ulvia release /path/to/resources --recursive
|
|
121
122
|
ulvia push all
|
|
@@ -151,7 +152,7 @@ ulvia release infra/releases
|
|
|
151
152
|
|
|
152
153
|
The official build and the trusted local `ulvia.release.ts` entry share the same
|
|
153
154
|
SDK inventory and compiler for feature contracts, manifest claims and bootstrap. See the
|
|
154
|
-
[SDK workflow](https://github.com/matthias-bernouy/CMS/blob/
|
|
155
|
+
[SDK workflow](https://github.com/matthias-bernouy/CMS/blob/b028b22aaecf33f088a238292cb1a727f95a3cdf/docs/development/sdk-releases.md) for explicit versions,
|
|
155
156
|
source-module rules and generated runtime attachment.
|
|
156
157
|
|
|
157
158
|
Contract fixture assets declared in `definition.json` are read from
|
|
@@ -282,7 +283,7 @@ exports collection example frames, generated PNGs, an interactive local explorer
|
|
|
282
283
|
provenance manifest. Screenshots require the Playwright Chromium browser
|
|
283
284
|
(`bunx playwright@1.64.1 install chromium`). Dependencies and required contracts are
|
|
284
285
|
resolved explicitly from local sources/cache; preview never publishes. See
|
|
285
|
-
[collection examples](https://github.com/matthias-bernouy/CMS/blob/
|
|
286
|
+
[collection examples](https://github.com/matthias-bernouy/CMS/blob/b028b22aaecf33f088a238292cb1a727f95a3cdf/docs/blocs/examples.md) for source and release formats.
|
|
286
287
|
|
|
287
288
|
### Editable collection publication
|
|
288
289
|
|
package/SHARED-HOSTING.md
CHANGED
|
@@ -31,7 +31,7 @@ Hosting 1.1 also admits names under persisted, Control-owned verified DNS zones.
|
|
|
31
31
|
`zones.claim` returns a dedicated `_ulvia-zone` TXT proof; `zones.verify` checks it
|
|
32
32
|
once to grant apex/descendant admissions. `zones.list` is cursor-paged and
|
|
33
33
|
`zones.disable` removes that grant without modifying existing sites. Reclaiming a
|
|
34
|
-
disabled zone rotates its proof. See the [zone workflow](https://github.com/matthias-bernouy/CMS/blob/
|
|
34
|
+
disabled zone rotates its proof. See the [zone workflow](https://github.com/matthias-bernouy/CMS/blob/b028b22aaecf33f088a238292cb1a727f95a3cdf/packages/features/hosting/docs/management/zones.md).
|
|
35
35
|
|
|
36
36
|
## Contract boundaries
|
|
37
37
|
|
|
@@ -292,7 +292,8 @@ cached and uncached Pages/assets, private callbacks through admitted bindings,
|
|
|
292
292
|
request counts and loaded volume. A cache HIT still performs fresh routing and
|
|
293
293
|
bounded authority metadata reads; the performance guardrails account explicitly
|
|
294
294
|
for that cost. The repeatable measurements are written to
|
|
295
|
-
`artifacts/
|
|
295
|
+
immutable `artifacts/performance/supplementary/<run-id>/` directories by the
|
|
296
|
+
runner, with sealed JSON and HTML. They describe the
|
|
296
297
|
fixture and machine under test, not a general production throughput guarantee.
|
|
297
298
|
|
|
298
299
|
The automated TLS fixture uses two actual Caddy 2.11.9 processes, a shared
|
package/dist/index.js
CHANGED
|
@@ -116,7 +116,7 @@ function defaultStackVersion() {
|
|
|
116
116
|
}
|
|
117
117
|
return injectedStackVersion;
|
|
118
118
|
}
|
|
119
|
-
var injectedCliVersion = "1.0.
|
|
119
|
+
var injectedCliVersion = "1.0.20", injectedStackVersion = "1.0.20", CLI_VERSION, DEFAULT_STACK_VERSION;
|
|
120
120
|
var init_version = __esm(() => {
|
|
121
121
|
CLI_VERSION = injectedCliVersion ?? "development";
|
|
122
122
|
DEFAULT_STACK_VERSION = injectedStackVersion ?? "unbundled";
|
|
@@ -5999,6 +5999,80 @@ async function readRepositoryToken(stream) {
|
|
|
5999
5999
|
}
|
|
6000
6000
|
}
|
|
6001
6001
|
|
|
6002
|
+
// packages/runtimes/ulvia-cli/src/runtime/repository/prompt.ts
|
|
6003
|
+
async function promptRepositoryToken(input = process.stdin, output = process.stderr) {
|
|
6004
|
+
if (!input.isTTY || !output.isTTY) {
|
|
6005
|
+
throw new Error("Provide a Repository PAT through ULVIA_REPOSITORY_TOKEN or --token-stdin outside a terminal");
|
|
6006
|
+
}
|
|
6007
|
+
const wasRaw = input.isRaw === true;
|
|
6008
|
+
const wasFlowing = input.readableFlowing === true;
|
|
6009
|
+
let cleanup = () => {};
|
|
6010
|
+
let value = "";
|
|
6011
|
+
let size = 0;
|
|
6012
|
+
try {
|
|
6013
|
+
input.setRawMode(true);
|
|
6014
|
+
output.write("Repository PAT: ");
|
|
6015
|
+
return await new Promise((resolve, reject) => {
|
|
6016
|
+
const data = (chunk) => {
|
|
6017
|
+
size += Buffer.byteLength(chunk);
|
|
6018
|
+
if (size > 128) {
|
|
6019
|
+
reject(new Error("Repository token input exceeds its byte limit"));
|
|
6020
|
+
return;
|
|
6021
|
+
}
|
|
6022
|
+
for (const byte of Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)) {
|
|
6023
|
+
if (byte === 3) {
|
|
6024
|
+
reject(new Error("Repository login cancelled"));
|
|
6025
|
+
return;
|
|
6026
|
+
}
|
|
6027
|
+
if (byte === 4) {
|
|
6028
|
+
reject(new Error("Repository token input ended before submission"));
|
|
6029
|
+
return;
|
|
6030
|
+
}
|
|
6031
|
+
if (byte === 13 || byte === 10) {
|
|
6032
|
+
const token = value.trim();
|
|
6033
|
+
if (token) {
|
|
6034
|
+
resolve(token);
|
|
6035
|
+
} else {
|
|
6036
|
+
reject(new Error("Provide a Repository PAT"));
|
|
6037
|
+
}
|
|
6038
|
+
return;
|
|
6039
|
+
}
|
|
6040
|
+
if (byte === 8 || byte === 127) {
|
|
6041
|
+
value = value.slice(0, -1);
|
|
6042
|
+
} else if (byte >= 32 && byte <= 126) {
|
|
6043
|
+
value += String.fromCharCode(byte);
|
|
6044
|
+
} else {
|
|
6045
|
+
reject(new Error("Repository token input contains an unsupported character"));
|
|
6046
|
+
return;
|
|
6047
|
+
}
|
|
6048
|
+
}
|
|
6049
|
+
};
|
|
6050
|
+
const ended = () => reject(new Error("Repository token input ended before submission"));
|
|
6051
|
+
const failed = () => reject(new Error("Repository token input failed"));
|
|
6052
|
+
cleanup = () => {
|
|
6053
|
+
input.removeListener("data", data);
|
|
6054
|
+
input.removeListener("end", ended);
|
|
6055
|
+
input.removeListener("close", ended);
|
|
6056
|
+
input.removeListener("error", failed);
|
|
6057
|
+
};
|
|
6058
|
+
input.on("data", data);
|
|
6059
|
+
input.once("end", ended);
|
|
6060
|
+
input.once("close", ended);
|
|
6061
|
+
input.once("error", failed);
|
|
6062
|
+
input.resume();
|
|
6063
|
+
});
|
|
6064
|
+
} finally {
|
|
6065
|
+
cleanup();
|
|
6066
|
+
value = "";
|
|
6067
|
+
input.setRawMode(wasRaw);
|
|
6068
|
+
if (!wasFlowing) {
|
|
6069
|
+
input.pause();
|
|
6070
|
+
}
|
|
6071
|
+
output.write(`
|
|
6072
|
+
`);
|
|
6073
|
+
}
|
|
6074
|
+
}
|
|
6075
|
+
|
|
6002
6076
|
// packages/runtimes/ulvia-cli/src/commands/local/repository.ts
|
|
6003
6077
|
async function repositoryConnectionCommand(args, log, environment, stdin) {
|
|
6004
6078
|
if (!args.length || args.includes("--help") || args[0] === "help") {
|
|
@@ -6011,7 +6085,7 @@ async function repositoryConnectionCommand(args, log, environment, stdin) {
|
|
|
6011
6085
|
if (!rest[0] || rest.length > 2 || rest.length === 2 && rest[1] !== "--token-stdin") {
|
|
6012
6086
|
throw new Error(HELP2);
|
|
6013
6087
|
}
|
|
6014
|
-
const token = rest[1] === "--token-stdin" ? await readRepositoryToken(stdin ?? Bun.stdin.stream()) : environment.ULVIA_REPOSITORY_TOKEN?.trim();
|
|
6088
|
+
const token = rest[1] === "--token-stdin" ? await readRepositoryToken(stdin ?? Bun.stdin.stream()) : environment.ULVIA_REPOSITORY_TOKEN?.trim() || await promptRepositoryToken();
|
|
6015
6089
|
if (!token) {
|
|
6016
6090
|
throw new Error("Provide a Repository PAT through ULVIA_REPOSITORY_TOKEN or --token-stdin");
|
|
6017
6091
|
}
|
|
@@ -6033,7 +6107,8 @@ var HELP2 = `Usage:
|
|
|
6033
6107
|
ulvia repository logout
|
|
6034
6108
|
|
|
6035
6109
|
Login verifies and saves a PAT pinned to the Repository origin and identity.
|
|
6036
|
-
|
|
6110
|
+
Enter it at the hidden terminal prompt, or use ULVIA_REPOSITORY_TOKEN or --token-stdin.
|
|
6111
|
+
Tokens are never accepted as arguments.
|
|
6037
6112
|
Create an instance through Control, then choose A new Repository in its setup.
|
|
6038
6113
|
It uses the normal Edge, Provider and Mongo deployment.`;
|
|
6039
6114
|
var init_repository = __esm(() => {
|
|
@@ -6717,7 +6792,7 @@ var init_state = __esm(() => {
|
|
|
6717
6792
|
import { readFile as readFile2 } from "fs/promises";
|
|
6718
6793
|
import { resolve as resolve2 } from "path";
|
|
6719
6794
|
function embeddedStackRelease() {
|
|
6720
|
-
return typeof { schema: "ulvia.stack-release.v1", version: "1.0.
|
|
6795
|
+
return typeof { schema: "ulvia.stack-release.v1", version: "1.0.20", stackApi: 1, files: { "services.yml": `services:
|
|
6721
6796
|
proxy:
|
|
6722
6797
|
image: caddy:2.11.9-alpine@sha256:0bbb055bda6793c999bde78b1b5ce3e89f829fb031af2cf50056ea1246559fee
|
|
6723
6798
|
restart: unless-stopped
|
|
@@ -6884,7 +6959,7 @@ if (existing) {
|
|
|
6884
6959
|
} else {
|
|
6885
6960
|
admin.createUser({ user: username, pwd: password, roles });
|
|
6886
6961
|
}
|
|
6887
|
-
` }, digest: "sha256:
|
|
6962
|
+
` }, digest: "sha256:9cfbb82f85da867b0ad3c2b60979867657ac37ee2250e7aac1b94f5a86896e99" } === "object" ? parseStackRelease({ schema: "ulvia.stack-release.v1", version: "1.0.20", stackApi: 1, files: { "services.yml": `services:
|
|
6888
6963
|
proxy:
|
|
6889
6964
|
image: caddy:2.11.9-alpine@sha256:0bbb055bda6793c999bde78b1b5ce3e89f829fb031af2cf50056ea1246559fee
|
|
6890
6965
|
restart: unless-stopped
|
|
@@ -7051,7 +7126,7 @@ if (existing) {
|
|
|
7051
7126
|
} else {
|
|
7052
7127
|
admin.createUser({ user: username, pwd: password, roles });
|
|
7053
7128
|
}
|
|
7054
|
-
` }, digest: "sha256:
|
|
7129
|
+
` }, digest: "sha256:9cfbb82f85da867b0ad3c2b60979867657ac37ee2250e7aac1b94f5a86896e99" }) : undefined;
|
|
7055
7130
|
}
|
|
7056
7131
|
async function sourceStackRelease(version, directory = resolve2(import.meta.dir, "../orchestration/definitions")) {
|
|
7057
7132
|
const files = Object.fromEntries(await Promise.all(RELEASE_FILES.map(async (name) => [name, await readFile2(resolve2(directory, name), "utf8")])));
|
|
@@ -15143,6 +15218,30 @@ var init_timestamps = __esm(() => {
|
|
|
15143
15218
|
init_errors12();
|
|
15144
15219
|
});
|
|
15145
15220
|
|
|
15221
|
+
// packages/features/content/src/blocs/core/markup/contentRefs.ts
|
|
15222
|
+
function extractRefs(html) {
|
|
15223
|
+
const blocs = new Set;
|
|
15224
|
+
for (const m of html.matchAll(BLOC_RE)) {
|
|
15225
|
+
const tag = (m[2] ?? "").toLowerCase();
|
|
15226
|
+
if (RESERVED_PREFIXES.some((p) => tag.startsWith(p))) {
|
|
15227
|
+
continue;
|
|
15228
|
+
}
|
|
15229
|
+
blocs.add(tag);
|
|
15230
|
+
}
|
|
15231
|
+
return { blocs };
|
|
15232
|
+
}
|
|
15233
|
+
var RESERVED_PREFIXES, BLOC_RE;
|
|
15234
|
+
var init_contentRefs = __esm(() => {
|
|
15235
|
+
RESERVED_PREFIXES = ["p9r-", "w13c-", "be5-", "cms-"];
|
|
15236
|
+
BLOC_RE = /\bcms-bloc\s*=\s*(["'])([a-z][a-z0-9]*-[a-z0-9-]+)\1/giu;
|
|
15237
|
+
});
|
|
15238
|
+
|
|
15239
|
+
// packages/features/content/src/blocs/core/catalogue/editing/references.ts
|
|
15240
|
+
var init_references = __esm(() => {
|
|
15241
|
+
init_contentRefs();
|
|
15242
|
+
init_errors12();
|
|
15243
|
+
});
|
|
15244
|
+
|
|
15146
15245
|
// packages/features/content/src/blocs/core/catalogue/ownership.ts
|
|
15147
15246
|
var init_ownership = __esm(() => {
|
|
15148
15247
|
init_errors12();
|
|
@@ -15152,10 +15251,18 @@ var init_ownership = __esm(() => {
|
|
|
15152
15251
|
var init_records = __esm(() => {
|
|
15153
15252
|
init_errors12();
|
|
15154
15253
|
init_timestamps();
|
|
15254
|
+
init_references();
|
|
15155
15255
|
init_ownership();
|
|
15156
15256
|
init_ownership();
|
|
15157
15257
|
});
|
|
15158
15258
|
|
|
15259
|
+
// packages/features/content/src/blocs/core/validation/snapshot/budget.ts
|
|
15260
|
+
var SITE_BLOC_DOCUMENT_LIMIT;
|
|
15261
|
+
var init_budget = __esm(() => {
|
|
15262
|
+
init_errors12();
|
|
15263
|
+
SITE_BLOC_DOCUMENT_LIMIT = 4 * 1024 * 1024;
|
|
15264
|
+
});
|
|
15265
|
+
|
|
15159
15266
|
// packages/features/content/src/application/core/validation/predicates.ts
|
|
15160
15267
|
function isValidPathFormat(path) {
|
|
15161
15268
|
if (!path || typeof path !== "string") {
|
|
@@ -39372,10 +39479,8 @@ var init_nativeReferences = __esm(() => {
|
|
|
39372
39479
|
});
|
|
39373
39480
|
|
|
39374
39481
|
// packages/features/content/src/blocs/core/markup/validation/nativeContent.ts
|
|
39375
|
-
function
|
|
39376
|
-
const
|
|
39377
|
-
const { document: document2 } = parseHTML("<!DOCTYPE html><html><head></head><body></body></html>");
|
|
39378
|
-
document2.body.innerHTML = normalized;
|
|
39482
|
+
function validatePageContentDocument(value) {
|
|
39483
|
+
const document2 = validateNativeDocument(value, "content");
|
|
39379
39484
|
for (const node of Array.from(document2.body.childNodes)) {
|
|
39380
39485
|
if (node.nodeType === 3 && node.textContent?.trim()) {
|
|
39381
39486
|
throw new ContentValidationError("content", "Page root text must be owned by a Bloc slot", {
|
|
@@ -39386,7 +39491,7 @@ function validatePageContentMarkup(value) {
|
|
|
39386
39491
|
throw new ContentValidationError("content", `native <${node.localName}> cannot be a Page root without cms-bloc`, { code: "page.root_bloc", parameters: { tag: node.localName } });
|
|
39387
39492
|
}
|
|
39388
39493
|
}
|
|
39389
|
-
return
|
|
39494
|
+
return document2;
|
|
39390
39495
|
}
|
|
39391
39496
|
function validateBlocContentMarkup(value, options) {
|
|
39392
39497
|
const html = validateNativeMarkup(value, options.field, options.kind === "default" ? options.ownerTag : undefined, {
|
|
@@ -39424,6 +39529,9 @@ function extractMutations(document2) {
|
|
|
39424
39529
|
return bindings.filter((mutation) => !mutation.contractId.startsWith("edge."));
|
|
39425
39530
|
}
|
|
39426
39531
|
function validateNativeMarkup(value, field, rootParentTag, options = {}, enforceBlocBudgets = false) {
|
|
39532
|
+
return validateNativeDocument(value, field, rootParentTag, options, enforceBlocBudgets).body.innerHTML;
|
|
39533
|
+
}
|
|
39534
|
+
function validateNativeDocument(value, field, rootParentTag, options = {}, enforceBlocBudgets = false) {
|
|
39427
39535
|
if (enforceBlocBudgets) {
|
|
39428
39536
|
assertBlocMarkupLength(field, value);
|
|
39429
39537
|
}
|
|
@@ -39447,7 +39555,7 @@ function validateNativeMarkup(value, field, rootParentTag, options = {}, enforce
|
|
|
39447
39555
|
throw new ContentValidationError(field, issue, { code: "page.html_invalid", parameters: { field } });
|
|
39448
39556
|
}
|
|
39449
39557
|
validateNativeDocumentReferences(document2, field);
|
|
39450
|
-
return document2
|
|
39558
|
+
return document2;
|
|
39451
39559
|
}
|
|
39452
39560
|
function containsComment(root) {
|
|
39453
39561
|
for (const child of Array.from(root.childNodes)) {
|
|
@@ -39477,9 +39585,10 @@ var init_nativeStructure = __esm(() => {
|
|
|
39477
39585
|
init_svgReference();
|
|
39478
39586
|
});
|
|
39479
39587
|
|
|
39480
|
-
// packages/features/content/src/blocs/core/validation/snapshot.ts
|
|
39588
|
+
// packages/features/content/src/blocs/core/validation/snapshot/index.ts
|
|
39481
39589
|
var init_snapshot = __esm(() => {
|
|
39482
39590
|
init_errors12();
|
|
39591
|
+
init_budget();
|
|
39483
39592
|
init_nativeContent();
|
|
39484
39593
|
init_nativeHtml();
|
|
39485
39594
|
init_nativeStructure();
|
|
@@ -39635,33 +39744,10 @@ var init_definition = __esm(() => {
|
|
|
39635
39744
|
]);
|
|
39636
39745
|
});
|
|
39637
39746
|
|
|
39638
|
-
// packages/features/content/src/blocs/core/markup/contentRefs.ts
|
|
39639
|
-
function extractRefs(html) {
|
|
39640
|
-
const blocs = new Set;
|
|
39641
|
-
for (const m of html.matchAll(BLOC_RE)) {
|
|
39642
|
-
const tag = (m[2] ?? "").toLowerCase();
|
|
39643
|
-
if (RESERVED_PREFIXES.some((p) => tag.startsWith(p))) {
|
|
39644
|
-
continue;
|
|
39645
|
-
}
|
|
39646
|
-
blocs.add(tag);
|
|
39647
|
-
}
|
|
39648
|
-
return { blocs };
|
|
39649
|
-
}
|
|
39650
|
-
var RESERVED_PREFIXES, BLOC_RE;
|
|
39651
|
-
var init_contentRefs = __esm(() => {
|
|
39652
|
-
RESERVED_PREFIXES = ["p9r-", "w13c-", "be5-", "cms-"];
|
|
39653
|
-
BLOC_RE = /\bcms-bloc\s*=\s*(["'])([a-z][a-z0-9]*-[a-z0-9-]+)\1/giu;
|
|
39654
|
-
});
|
|
39655
|
-
|
|
39656
39747
|
// packages/features/content/src/blocs/core/markup/validation/managedNativeElements.ts
|
|
39657
|
-
function
|
|
39658
|
-
if (contracts.length === 0) {
|
|
39659
|
-
return null;
|
|
39660
|
-
}
|
|
39661
|
-
const { document: document2 } = parseHTML("<!DOCTYPE html><html><body></body></html>");
|
|
39662
|
-
document2.body.innerHTML = content;
|
|
39748
|
+
function managedNativeDocumentIssue(root, contracts, options = {}) {
|
|
39663
39749
|
const hostsById = new Map;
|
|
39664
|
-
for (const host of
|
|
39750
|
+
for (const host of root.querySelectorAll("[cms-bloc]")) {
|
|
39665
39751
|
const id = host.getAttribute("cms-bloc");
|
|
39666
39752
|
const hosts = hostsById.get(id) ?? [];
|
|
39667
39753
|
hosts.push(host);
|
|
@@ -39837,24 +39923,30 @@ function expandCompositions(root, definitions, mode = "render", origins) {
|
|
|
39837
39923
|
const idScope = createTemplateIdScope(root);
|
|
39838
39924
|
const budget = origins ? { remaining: 50000, characters: 4 * 1024 * 1024 } : undefined;
|
|
39839
39925
|
const expansionLimit = markups.size * 100 + 1000;
|
|
39840
|
-
|
|
39841
|
-
|
|
39842
|
-
|
|
39843
|
-
|
|
39926
|
+
const pending = [];
|
|
39927
|
+
pushElements(pending, Array.from(root.childNodes));
|
|
39928
|
+
let count = 0;
|
|
39929
|
+
while (pending.length) {
|
|
39930
|
+
const host = pending.pop();
|
|
39931
|
+
const id = host.getAttribute("cms-bloc")?.toLowerCase();
|
|
39932
|
+
if (!id || !markups.has(id) || expanded.has(host) || host.hasAttribute(COMPOSITION_RUNTIME_ATTRIBUTE)) {
|
|
39933
|
+
pushElements(pending, Array.from(host.childNodes));
|
|
39934
|
+
continue;
|
|
39844
39935
|
}
|
|
39845
39936
|
expanded.add(host);
|
|
39846
|
-
expandHost(host, markups.get(host.getAttribute("cms-bloc")), mode, idScope, origins, budget);
|
|
39937
|
+
const inserted = expandHost(host, markups.get(host.getAttribute("cms-bloc")), mode, idScope, origins, budget);
|
|
39938
|
+
if (++count === expansionLimit) {
|
|
39939
|
+
throw new Error("Composition expansion exceeded its safety limit; check for a recursive composition dependency");
|
|
39940
|
+
}
|
|
39941
|
+
pushElements(pending, inserted);
|
|
39847
39942
|
}
|
|
39848
|
-
throw new Error("Composition expansion exceeded its safety limit; check for a recursive composition dependency");
|
|
39849
39943
|
}
|
|
39850
|
-
function
|
|
39851
|
-
for (
|
|
39852
|
-
|
|
39853
|
-
|
|
39854
|
-
return element;
|
|
39944
|
+
function pushElements(pending, nodes) {
|
|
39945
|
+
for (let index = nodes.length - 1;index >= 0; index--) {
|
|
39946
|
+
if (nodes[index].nodeType === 1) {
|
|
39947
|
+
pending.push(nodes[index]);
|
|
39855
39948
|
}
|
|
39856
39949
|
}
|
|
39857
|
-
return null;
|
|
39858
39950
|
}
|
|
39859
39951
|
function expandHost(host, definition, mode, idScope, origins, budget) {
|
|
39860
39952
|
const document2 = host.ownerDocument;
|
|
@@ -39891,17 +39983,18 @@ function expandHost(host, definition, mode, idScope, origins, budget) {
|
|
|
39891
39983
|
applyRootMarker(host, template.content);
|
|
39892
39984
|
if (mode === "render") {
|
|
39893
39985
|
host.replaceChildren(...Array.from(template.content.childNodes));
|
|
39894
|
-
return;
|
|
39986
|
+
return Array.from(host.childNodes);
|
|
39895
39987
|
}
|
|
39896
39988
|
host.replaceChildren(input, document2.createComment(COMPONENT_OUTPUT_START), ...Array.from(template.content.childNodes), document2.createComment(COMPONENT_OUTPUT_END));
|
|
39897
39989
|
host.setAttribute(COMPOSITION_RUNTIME_ATTRIBUTE, "");
|
|
39898
39990
|
host.setAttribute(COMPONENT_COMPOSITION_ATTRIBUTE, "");
|
|
39899
|
-
return;
|
|
39991
|
+
return Array.from(host.childNodes);
|
|
39900
39992
|
}
|
|
39901
39993
|
if (mode === "render") {
|
|
39902
39994
|
propagateHostSlot(host, template.content);
|
|
39903
|
-
|
|
39904
|
-
|
|
39995
|
+
const inserted = Array.from(template.content.childNodes);
|
|
39996
|
+
host.replaceWith(...inserted);
|
|
39997
|
+
return inserted;
|
|
39905
39998
|
}
|
|
39906
39999
|
const output = document2.createElement("cms-composition-output");
|
|
39907
40000
|
output.setAttribute(COMPOSITION_OUTPUT_ATTRIBUTE, "");
|
|
@@ -39909,6 +40002,7 @@ function expandHost(host, definition, mode, idScope, origins, budget) {
|
|
|
39909
40002
|
output.append(...Array.from(template.content.childNodes));
|
|
39910
40003
|
host.replaceChildren(input, output);
|
|
39911
40004
|
host.setAttribute(COMPOSITION_RUNTIME_ATTRIBUTE, "");
|
|
40005
|
+
return Array.from(host.childNodes);
|
|
39912
40006
|
}
|
|
39913
40007
|
function applyRootMarker(host, fragment) {
|
|
39914
40008
|
const marker = fragment.querySelector("template[cms-root]");
|
|
@@ -40976,15 +41070,14 @@ function validatePageDocument(html, blocs, options = {}) {
|
|
|
40976
41070
|
throw new ContentValidationError("content", error instanceof Error ? error.message : "invalid server text placement");
|
|
40977
41071
|
}
|
|
40978
41072
|
validateHosts(preflight, available, new Map((options.unresolvedBlocs ?? []).map((bloc) => [bloc.id, bloc])), true);
|
|
40979
|
-
const
|
|
41073
|
+
const document2 = validatePageContentDocument(html);
|
|
41074
|
+
const normalized = document2.body.innerHTML;
|
|
40980
41075
|
const unresolved = new Map((options.unresolvedBlocs ?? []).map((bloc) => [bloc.id, bloc]));
|
|
40981
41076
|
const uses = [...extractRefs(normalized).blocs].sort();
|
|
40982
41077
|
const missing = uses.filter((tag) => !available.has(tag) && !unresolved.has(tag));
|
|
40983
41078
|
if (missing.length > 0) {
|
|
40984
41079
|
throw new ContentValidationError("content", `unknown or hidden reference(s): ${missing.map((tag) => `bloc "${tag}"`).join(", ")}`, { code: "page.bloc_unknown", parameters: { bloc: missing.join(", ") } });
|
|
40985
41080
|
}
|
|
40986
|
-
const { document: document2 } = parseHTML("<!DOCTYPE html><html><head></head><body></body></html>");
|
|
40987
|
-
document2.body.innerHTML = normalized;
|
|
40988
41081
|
const queries = extractQueries(document2);
|
|
40989
41082
|
const mutations = extractMutations(document2);
|
|
40990
41083
|
if (options.capabilities || options.requireCapabilityResolution) {
|
|
@@ -40993,7 +41086,7 @@ function validatePageDocument(html, blocs, options = {}) {
|
|
|
40993
41086
|
validateRoots(document2, available, new Set(visible.keys()), new Set(unresolved.keys()));
|
|
40994
41087
|
validateHiddenNesting(document2, hidden, available);
|
|
40995
41088
|
validateHosts(document2, available, unresolved);
|
|
40996
|
-
validateManagedNative(
|
|
41089
|
+
validateManagedNative(document2.body, [...blocs, ...options.hiddenBlocs ?? []]);
|
|
40997
41090
|
return { html: document2.body.innerHTML, queries, mutations, uses };
|
|
40998
41091
|
}
|
|
40999
41092
|
function validateHiddenNesting(document2, hidden, available) {
|
|
@@ -41034,8 +41127,8 @@ function validateHosts(document2, known, unresolved, allowUnknown = false) {
|
|
|
41034
41127
|
}
|
|
41035
41128
|
}
|
|
41036
41129
|
}
|
|
41037
|
-
function validateManagedNative(
|
|
41038
|
-
const issue =
|
|
41130
|
+
function validateManagedNative(root, blocs) {
|
|
41131
|
+
const issue = managedNativeDocumentIssue(root, blocs.map((bloc) => ({ id: bloc.id, root: bloc.root })));
|
|
41039
41132
|
if (issue) {
|
|
41040
41133
|
throw new ContentValidationError("content", issue);
|
|
41041
41134
|
}
|
|
@@ -41387,7 +41480,7 @@ function problem(context, element, attribute, code, message) {
|
|
|
41387
41480
|
};
|
|
41388
41481
|
}
|
|
41389
41482
|
var REFERENCES;
|
|
41390
|
-
var
|
|
41483
|
+
var init_references2 = __esm(() => {
|
|
41391
41484
|
REFERENCES = [
|
|
41392
41485
|
"aria-activedescendant",
|
|
41393
41486
|
"aria-details",
|
|
@@ -41466,7 +41559,7 @@ var init_expandedPageDocument = __esm(() => {
|
|
|
41466
41559
|
init_expandCompositions();
|
|
41467
41560
|
init_stateGraph();
|
|
41468
41561
|
init_outline();
|
|
41469
|
-
|
|
41562
|
+
init_references2();
|
|
41470
41563
|
init_diagnostics();
|
|
41471
41564
|
init_errors12();
|
|
41472
41565
|
});
|
|
@@ -41519,7 +41612,7 @@ function validateFragment(html, ownerTag, known, unresolved, allowOwnedNative) {
|
|
|
41519
41612
|
document2.body.innerHTML = html;
|
|
41520
41613
|
validateReferences(html, document2, ownerTag, known, unresolved);
|
|
41521
41614
|
validateHostAttributes(document2, known, unresolved, true, true);
|
|
41522
|
-
validateManagedNative2(
|
|
41615
|
+
validateManagedNative2(document2.body, known);
|
|
41523
41616
|
for (const heading of Array.from(document2.body.querySelectorAll("h1, h2, h3, h4, h5, h6"))) {
|
|
41524
41617
|
if (!heading.hasAttribute("cms-bloc")) {
|
|
41525
41618
|
throw new ContentValidationError("fixedContent", `fixed Bloc markup cannot own <${heading.localName}>; place an explicit heading Bloc instead`);
|
|
@@ -41549,7 +41642,7 @@ function validateDefaultContent(owner, html, known, unresolved) {
|
|
|
41549
41642
|
document2.body.append(root);
|
|
41550
41643
|
validateReferences(html, document2, owner.id, known, unresolved);
|
|
41551
41644
|
validateHostAttributes(document2, known, unresolved, false);
|
|
41552
|
-
validateManagedNative2(document2.body
|
|
41645
|
+
validateManagedNative2(document2.body, known);
|
|
41553
41646
|
const host = document2.body.firstElementChild;
|
|
41554
41647
|
const issue = blocHostContractIssue(host, owner, known, unresolved);
|
|
41555
41648
|
if (issue) {
|
|
@@ -41589,8 +41682,8 @@ function validateHostAttributes(document2, known, unresolved, fragmentOwned, all
|
|
|
41589
41682
|
}
|
|
41590
41683
|
}
|
|
41591
41684
|
}
|
|
41592
|
-
function validateManagedNative2(
|
|
41593
|
-
const issue =
|
|
41685
|
+
function validateManagedNative2(root, known) {
|
|
41686
|
+
const issue = managedNativeDocumentIssue(root, [...known.values()].map((bloc) => ({ id: bloc.id, root: bloc.root })));
|
|
41594
41687
|
if (issue) {
|
|
41595
41688
|
throw new ContentValidationError("content", issue);
|
|
41596
41689
|
}
|
|
@@ -41619,6 +41712,8 @@ var init_assertContentRefsExist = __esm(() => {
|
|
|
41619
41712
|
init_expandedPageDocument();
|
|
41620
41713
|
init_diagnostics();
|
|
41621
41714
|
init_svgCapabilities();
|
|
41715
|
+
init_bindingAnalysis();
|
|
41716
|
+
init_esm7();
|
|
41622
41717
|
});
|
|
41623
41718
|
|
|
41624
41719
|
// packages/features/content/src/pages/core/routing/analysis/fragmentIndexCache.ts
|
|
@@ -41830,31 +41925,43 @@ function cssReferences(value) {
|
|
|
41830
41925
|
});
|
|
41831
41926
|
return result;
|
|
41832
41927
|
}
|
|
41833
|
-
function assertTokenColors(declaration, path) {
|
|
41928
|
+
function assertTokenColors(declaration, path, isColor = (name) => lexer.matchType("color", { type: "Identifier", name }).error === null) {
|
|
41834
41929
|
walk2(declaration.value, (node) => {
|
|
41835
41930
|
if (node.type === "Function" || node.type === "Identifier") {
|
|
41836
41931
|
node.name = ident.decode(node.name);
|
|
41837
41932
|
}
|
|
41838
|
-
const literal = node.type === "Hash" || node.type === "Function" && COLOR_FUNCTIONS2.has(node.name.toLowerCase()) && !(node.children.first?.type === "Identifier" && node.children.first.name.toLowerCase() === "from") || node.type === "Identifier" && !COLOR_KEYWORDS.has(node.name.toLowerCase()) &&
|
|
41933
|
+
const literal = node.type === "Hash" || node.type === "Function" && COLOR_FUNCTIONS2.has(node.name.toLowerCase()) && !(node.children.first?.type === "Identifier" && node.children.first.name.toLowerCase() === "from") || node.type === "Identifier" && !COLOR_KEYWORDS.has(node.name.toLowerCase()) && isColor(node.name.toLowerCase());
|
|
41839
41934
|
if (literal || node.type === "Raw" || node.type === "Function" && node.name.toLowerCase() === "attr") {
|
|
41840
41935
|
invalid(`${declaration.property}: ${generate2(declaration.value)} contains a raw or unverified color (${generate2(node)}); use a declared/imported theme token, optionally with color-mix()`, path);
|
|
41841
41936
|
}
|
|
41842
41937
|
});
|
|
41843
41938
|
}
|
|
41844
41939
|
function colorVariables(declarations, theme) {
|
|
41940
|
+
const identifiers = new Map;
|
|
41941
|
+
const isColor = (name) => {
|
|
41942
|
+
const cached = identifiers.get(name);
|
|
41943
|
+
if (cached !== undefined) {
|
|
41944
|
+
return cached;
|
|
41945
|
+
}
|
|
41946
|
+
const result = lexer.matchType("color", { type: "Identifier", name }).error === null;
|
|
41947
|
+
if (name.length <= 256 && identifiers.size < 256) {
|
|
41948
|
+
identifiers.set(name, result);
|
|
41949
|
+
}
|
|
41950
|
+
return result;
|
|
41951
|
+
};
|
|
41845
41952
|
const aliases = new Map;
|
|
41846
41953
|
const reached = new Set;
|
|
41847
41954
|
const graph = new Map;
|
|
41848
41955
|
for (const entry of declarations) {
|
|
41849
41956
|
const { declaration, path } = entry;
|
|
41850
41957
|
if (declaration.property.startsWith("--")) {
|
|
41851
|
-
assertTokenColors(declaration, path);
|
|
41958
|
+
assertTokenColors(declaration, path, isColor);
|
|
41852
41959
|
const name = declaration.property.slice(2);
|
|
41853
41960
|
const values = aliases.get(name) ?? [];
|
|
41854
41961
|
values.push(entry);
|
|
41855
41962
|
aliases.set(name, values);
|
|
41856
41963
|
} else if (blocStylePaintProperty(declaration.property.toLowerCase())) {
|
|
41857
|
-
assertTokenColors(declaration, path);
|
|
41964
|
+
assertTokenColors(declaration, path, isColor);
|
|
41858
41965
|
for (const name of cssReferences(declaration.value)) {
|
|
41859
41966
|
reached.add(name);
|
|
41860
41967
|
}
|
|
@@ -41864,8 +41971,7 @@ function colorVariables(declarations, theme) {
|
|
|
41864
41971
|
if (theme.has(name)) {
|
|
41865
41972
|
continue;
|
|
41866
41973
|
}
|
|
41867
|
-
for (const { declaration
|
|
41868
|
-
assertTokenColors(declaration, path);
|
|
41974
|
+
for (const { declaration } of aliases.get(name) ?? []) {
|
|
41869
41975
|
for (const dependency of cssReferences(declaration.value)) {
|
|
41870
41976
|
reached.add(dependency);
|
|
41871
41977
|
if (!theme.has(dependency)) {
|
|
@@ -47156,9 +47262,10 @@ function snapshotCollectionAssets(declarations, assets, limits) {
|
|
|
47156
47262
|
});
|
|
47157
47263
|
return Object.freeze(snapshots.sort((left, right) => ordinal(left.id, right.id)));
|
|
47158
47264
|
}
|
|
47159
|
-
async function verifyCollectionAssets(declarations, snapshots) {
|
|
47265
|
+
async function verifyCollectionAssets(declarations, snapshots, signal) {
|
|
47160
47266
|
const supplied = new Map(snapshots.map((asset) => [asset.id, asset.bytes]));
|
|
47161
47267
|
for (const declaration of declarations) {
|
|
47268
|
+
signal?.throwIfAborted();
|
|
47162
47269
|
const path = `$.assets.${declaration.id}`;
|
|
47163
47270
|
const bytes = supplied.get(declaration.id);
|
|
47164
47271
|
if (!bytes || bytes.size !== declaration.byteLength) {
|
|
@@ -47166,6 +47273,7 @@ async function verifyCollectionAssets(declarations, snapshots) {
|
|
|
47166
47273
|
}
|
|
47167
47274
|
const content = new Uint8Array(await bytes.arrayBuffer());
|
|
47168
47275
|
const digest = await sha256Digest(content);
|
|
47276
|
+
signal?.throwIfAborted();
|
|
47169
47277
|
if (digest !== declaration.digest) {
|
|
47170
47278
|
mismatch("asset digest mismatch", path);
|
|
47171
47279
|
}
|
|
@@ -48845,12 +48953,18 @@ var init_organization = __esm(() => {
|
|
|
48845
48953
|
init_errors12();
|
|
48846
48954
|
});
|
|
48847
48955
|
|
|
48956
|
+
// packages/features/content/src/settings/core/favicon.ts
|
|
48957
|
+
var init_favicon = __esm(() => {
|
|
48958
|
+
init_errors12();
|
|
48959
|
+
});
|
|
48960
|
+
|
|
48848
48961
|
// packages/features/content/src/settings/core/validation/index.ts
|
|
48849
48962
|
var init_validation5 = __esm(() => {
|
|
48850
48963
|
init_errors12();
|
|
48851
48964
|
init_core3();
|
|
48852
48965
|
init_organization();
|
|
48853
48966
|
init_values3();
|
|
48967
|
+
init_favicon();
|
|
48854
48968
|
});
|
|
48855
48969
|
|
|
48856
48970
|
// packages/features/content/src/pages/http/publishedPageSnapshot.ts
|
|
@@ -48990,6 +49104,50 @@ var init_fields = __esm(() => {
|
|
|
48990
49104
|
init_nativeContent();
|
|
48991
49105
|
MAX_PAGE_CONTENT_LENGTH = 1024 * 1024;
|
|
48992
49106
|
});
|
|
49107
|
+
// packages/features/content/src/blocs/core/validation/index.ts
|
|
49108
|
+
var init_validation6 = __esm(() => {
|
|
49109
|
+
init_definition();
|
|
49110
|
+
init_snapshot();
|
|
49111
|
+
init_nativeStructure();
|
|
49112
|
+
});
|
|
49113
|
+
// packages/features/content/src/blocs/core/publication/source/siteBlocHtml.ts
|
|
49114
|
+
var init_siteBlocHtml = __esm(() => {
|
|
49115
|
+
init_types2();
|
|
49116
|
+
init_nativeContent();
|
|
49117
|
+
init_expandCompositions();
|
|
49118
|
+
init_nativeBindings();
|
|
49119
|
+
init_nativeHtml();
|
|
49120
|
+
init_validation6();
|
|
49121
|
+
});
|
|
49122
|
+
|
|
49123
|
+
// packages/features/content/src/blocs/core/publication/source/generateSiteBlocSourceBundle.ts
|
|
49124
|
+
var init_generateSiteBlocSourceBundle = __esm(() => {
|
|
49125
|
+
init_validation6();
|
|
49126
|
+
init_siteBlocHtml();
|
|
49127
|
+
});
|
|
49128
|
+
|
|
49129
|
+
// packages/features/content/src/blocs/core/catalogue/siteBlocMarkup.ts
|
|
49130
|
+
var init_siteBlocMarkup = __esm(() => {
|
|
49131
|
+
init_esm7();
|
|
49132
|
+
init_errors12();
|
|
49133
|
+
});
|
|
49134
|
+
|
|
49135
|
+
// packages/features/content/src/blocs/core/catalogue/siteBlocContracts.ts
|
|
49136
|
+
var init_siteBlocContracts = __esm(() => {
|
|
49137
|
+
init_errors12();
|
|
49138
|
+
init_generateSiteBlocSourceBundle();
|
|
49139
|
+
init_siteBlocHtml();
|
|
49140
|
+
init_siteBlocMarkup();
|
|
49141
|
+
init_validation6();
|
|
49142
|
+
});
|
|
49143
|
+
|
|
49144
|
+
// packages/features/content/src/blocs/core/catalogue/editing/documents.ts
|
|
49145
|
+
var init_documents = __esm(() => {
|
|
49146
|
+
init_errors12();
|
|
49147
|
+
init_budget();
|
|
49148
|
+
init_siteBlocContracts();
|
|
49149
|
+
});
|
|
49150
|
+
|
|
48993
49151
|
// packages/features/content/src/pages/core/contracts/listPages.ts
|
|
48994
49152
|
var init_listPages = __esm(() => {
|
|
48995
49153
|
init_errors12();
|
|
@@ -49102,7 +49260,9 @@ var init_system = __esm(() => {
|
|
|
49102
49260
|
init_core3();
|
|
49103
49261
|
});
|
|
49104
49262
|
// packages/features/content/src/blocs/core/publication/SiteBlocPublicationQueue.ts
|
|
49105
|
-
var init_SiteBlocPublicationQueue = () => {
|
|
49263
|
+
var init_SiteBlocPublicationQueue = __esm(() => {
|
|
49264
|
+
init_errors12();
|
|
49265
|
+
});
|
|
49106
49266
|
|
|
49107
49267
|
// packages/features/content/src/application/default-implementation/memory/InMemoryBlocRepository.ts
|
|
49108
49268
|
var init_InMemoryBlocRepository = __esm(() => {
|
|
@@ -49129,6 +49289,11 @@ var init_InMemoryPageRepository = __esm(() => {
|
|
|
49129
49289
|
init_values3();
|
|
49130
49290
|
});
|
|
49131
49291
|
|
|
49292
|
+
// packages/features/content/src/application/default-implementation/memory/siteBlocDeletion.ts
|
|
49293
|
+
var init_siteBlocDeletion = __esm(() => {
|
|
49294
|
+
init_references();
|
|
49295
|
+
});
|
|
49296
|
+
|
|
49132
49297
|
// packages/features/content/src/application/default-implementation/memory/InMemoryContentRepository.ts
|
|
49133
49298
|
var init_InMemoryContentRepository = __esm(() => {
|
|
49134
49299
|
init_errors12();
|
|
@@ -49136,43 +49301,7 @@ var init_InMemoryContentRepository = __esm(() => {
|
|
|
49136
49301
|
init_system();
|
|
49137
49302
|
init_pagePaths();
|
|
49138
49303
|
init_InMemoryPageRepository();
|
|
49139
|
-
|
|
49140
|
-
|
|
49141
|
-
// packages/features/content/src/blocs/core/validation/index.ts
|
|
49142
|
-
var init_validation6 = __esm(() => {
|
|
49143
|
-
init_definition();
|
|
49144
|
-
init_snapshot();
|
|
49145
|
-
init_nativeStructure();
|
|
49146
|
-
});
|
|
49147
|
-
// packages/features/content/src/blocs/core/publication/source/siteBlocHtml.ts
|
|
49148
|
-
var init_siteBlocHtml = __esm(() => {
|
|
49149
|
-
init_types2();
|
|
49150
|
-
init_nativeContent();
|
|
49151
|
-
init_expandCompositions();
|
|
49152
|
-
init_nativeBindings();
|
|
49153
|
-
init_nativeHtml();
|
|
49154
|
-
init_validation6();
|
|
49155
|
-
});
|
|
49156
|
-
|
|
49157
|
-
// packages/features/content/src/blocs/core/publication/source/generateSiteBlocSourceBundle.ts
|
|
49158
|
-
var init_generateSiteBlocSourceBundle = __esm(() => {
|
|
49159
|
-
init_validation6();
|
|
49160
|
-
init_siteBlocHtml();
|
|
49161
|
-
});
|
|
49162
|
-
|
|
49163
|
-
// packages/features/content/src/blocs/core/catalogue/siteBlocMarkup.ts
|
|
49164
|
-
var init_siteBlocMarkup = __esm(() => {
|
|
49165
|
-
init_esm7();
|
|
49166
|
-
init_errors12();
|
|
49167
|
-
});
|
|
49168
|
-
|
|
49169
|
-
// packages/features/content/src/blocs/core/catalogue/siteBlocContracts.ts
|
|
49170
|
-
var init_siteBlocContracts = __esm(() => {
|
|
49171
|
-
init_errors12();
|
|
49172
|
-
init_generateSiteBlocSourceBundle();
|
|
49173
|
-
init_siteBlocHtml();
|
|
49174
|
-
init_siteBlocMarkup();
|
|
49175
|
-
init_validation6();
|
|
49304
|
+
init_siteBlocDeletion();
|
|
49176
49305
|
});
|
|
49177
49306
|
// packages/features/content/src/pages/core/indexing/detection.ts
|
|
49178
49307
|
var init_detection = __esm(() => {
|
|
@@ -49237,6 +49366,8 @@ var init_ValidatingContentRepository = __esm(() => {
|
|
|
49237
49366
|
var init_exports7 = __esm(() => {
|
|
49238
49367
|
init_presentationImage();
|
|
49239
49368
|
init_fields();
|
|
49369
|
+
init_documents();
|
|
49370
|
+
init_references();
|
|
49240
49371
|
init_listPages();
|
|
49241
49372
|
init_renamePage();
|
|
49242
49373
|
init_pageDetails();
|
|
@@ -51918,7 +52049,7 @@ var init_clock = __esm(() => {
|
|
|
51918
52049
|
var init_errors17 = () => {};
|
|
51919
52050
|
|
|
51920
52051
|
// packages/platform/providers/src/installations/core/parsing/documents.ts
|
|
51921
|
-
var
|
|
52052
|
+
var init_documents2 = __esm(() => {
|
|
51922
52053
|
init_exports3();
|
|
51923
52054
|
init_protocol();
|
|
51924
52055
|
init_errors15();
|
|
@@ -52035,7 +52166,7 @@ var init_preview = __esm(() => {
|
|
|
52035
52166
|
var init_validation8 = __esm(() => {
|
|
52036
52167
|
init_clock();
|
|
52037
52168
|
init_clock();
|
|
52038
|
-
|
|
52169
|
+
init_documents2();
|
|
52039
52170
|
init_fields2();
|
|
52040
52171
|
init_normalizeManifestYank();
|
|
52041
52172
|
init_validateProviderManifest();
|
package/dist/stack-release.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema":"ulvia.stack-release.v1","version":"1.0.
|
|
1
|
+
{"schema":"ulvia.stack-release.v1","version":"1.0.20","stackApi":1,"files":{"services.yml":"services:\n proxy:\n image: caddy:2.11.9-alpine@sha256:0bbb055bda6793c999bde78b1b5ce3e89f829fb031af2cf50056ea1246559fee\n restart: unless-stopped\n user: \"${ULVIA_UID}:${ULVIA_GID}\"\n command: [\"caddy\", \"run\", \"--config\", \"/etc/caddy/ulvia.json\"]\n ports:\n - \"${ULVIA_BIND_ADDRESS}:${ULVIA_HTTP_PORT}:80\"\n volumes:\n - ${ULVIA_CADDY_CONFIG}:/etc/caddy/ulvia.json:ro\n - ${ULVIA_PROXY_CERTIFICATES_DIR}:/data\n environment:\n ULVIA_CONFIG_DIGEST: ${ULVIA_CADDY_CONFIG_DIGEST}\n XDG_DATA_HOME: /data\n XDG_CONFIG_HOME: /tmp/config\n networks:\n - instances\n read_only: true\n tmpfs:\n - /tmp:rw,nosuid,nodev,noexec,size=32m\n cap_drop: [ALL]\n security_opt: [no-new-privileges:true]\n stop_grace_period: 30s\n\n mongo:\n ulimits:\n nofile:\n soft: 65536\n hard: 65536\n image: mongo:7.0.37@sha256:d5b3ca8c3f3cdce78d44870dc0871b76d5235e9b2ad4ea6bea5d1fbff8027703\n restart: unless-stopped\n user: \"${ULVIA_UID}:${ULVIA_GID}\"\n environment:\n MONGO_INITDB_ROOT_USERNAME: ${ULVIA_MONGO_USERNAME}\n MONGO_INITDB_ROOT_PASSWORD: ${ULVIA_MONGO_PASSWORD}\n volumes:\n - type: bind\n source: ${ULVIA_MONGO_DIR}\n target: /data/db\n networks:\n - private\n healthcheck:\n test:\n [\n \"CMD-SHELL\",\n \"mongosh --quiet --username \\\"$$MONGO_INITDB_ROOT_USERNAME\\\" --password \\\"$$MONGO_INITDB_ROOT_PASSWORD\\\" --authenticationDatabase admin --eval 'quit(db.adminCommand({ ping: 1 }).ok ? 0 : 1)'\",\n ]\n interval: 30s\n timeout: 5s\n retries: 3\n start_period: 10s\n stop_grace_period: 30s\n\n mongo-provision:\n image: mongo:7.0.37@sha256:d5b3ca8c3f3cdce78d44870dc0871b76d5235e9b2ad4ea6bea5d1fbff8027703\n restart: \"no\"\n user: \"${ULVIA_UID}:${ULVIA_GID}\"\n environment:\n HOME: /tmp\n MONGO_INITDB_ROOT_USERNAME: ${ULVIA_MONGO_USERNAME}\n MONGO_INITDB_ROOT_PASSWORD: ${ULVIA_MONGO_PASSWORD}\n MONGO_PROVIDER_USERNAME: ${ULVIA_MONGO_PROVIDER_USERNAME}\n MONGO_PROVIDER_PASSWORD: ${ULVIA_MONGO_PROVIDER_PASSWORD}\n entrypoint: [\"/bin/sh\", \"-c\"]\n command:\n - >-\n exec mongosh --quiet --host mongo\n --username \"$$MONGO_INITDB_ROOT_USERNAME\"\n --password \"$$MONGO_INITDB_ROOT_PASSWORD\"\n --authenticationDatabase admin\n /opt/ulvia-mongo/provision-provider.js\n volumes:\n - ./mongo/provision-provider.js:/opt/ulvia-mongo/provision-provider.js:ro\n networks:\n - private\n depends_on:\n mongo:\n condition: service_healthy\n read_only: true\n tmpfs:\n - /tmp:rw,nosuid,nodev,noexec,size=32m\n cap_drop: [ALL]\n security_opt: [no-new-privileges:true]\n\n provider:\n image: ${PROVIDER_IMAGE}\n restart: unless-stopped\n init: true\n user: \"${ULVIA_UID}:${ULVIA_GID}\"\n environment:\n MODE: PROD\n NODE_ENV: production\n CMS_FILES_DIR: /var/lib/cms/files\n CMS_SESSION_SECRET: ${ULVIA_PROVIDER_SESSION_SECRET}\n CMS_KEK_ACTIVE_ID: ${ULVIA_PROVIDER_KEK_ACTIVE_ID}\n CMS_KEK_RING_JSON: ${ULVIA_PROVIDER_KEK_RING_JSON}\n MONGO_URL: mongodb://${ULVIA_MONGO_PROVIDER_USERNAME}:${ULVIA_MONGO_PROVIDER_PASSWORD}@mongo:27017/ulvia_provider_control?authSource=admin&retryWrites=false\n ULVIA_PROVIDER_HOST: 0.0.0.0\n ULVIA_PROVIDER_PORT: \"5103\"\n ULVIA_PROVIDER_PUBLIC_URL: http://ulvia-provider:5103\n ULVIA_PROVIDER_OPERATOR_TOKEN: ${ULVIA_PROVIDER_OPERATOR_TOKEN}\n ULVIA_CONTROL_ORIGIN: ${ULVIA_CONTROL_ORIGIN}\n ULVIA_HOSTING_PROXY_URL: http://proxy:8080\n ULVIA_CONTROL_BOOTSTRAP_FILE: /run/ulvia/control-administrator.json\n ULVIA_EDGE_ROUTING_SECRET: ${ULVIA_EDGE_ROUTING_SECRET}\n ULVIA_HOSTING_MANAGED_SUFFIXES: ${ULVIA_HOSTING_MANAGED_SUFFIXES}\n ULVIA_TLS_ENTRYPOINTS: ${ULVIA_TLS_ENTRYPOINTS}\n ULVIA_TLS_PUBLIC_ADDRESSES: ${ULVIA_TLS_PUBLIC_ADDRESSES}\n volumes:\n - ${ULVIA_CONTROL_CREDENTIALS_DIR}:/run/ulvia:ro\n - type: bind\n source: ${ULVIA_FILES_DIR}\n target: /var/lib/cms/files\n ports:\n - \"127.0.0.1:${ULVIA_PROVIDER_PORT}:5103\"\n networks:\n private: {}\n instances:\n aliases:\n - ulvia-provider\n depends_on:\n mongo-provision:\n condition: service_completed_successfully\n read_only: true\n tmpfs:\n - /tmp:rw,nosuid,nodev,noexec,size=256m\n cap_drop: [ALL]\n security_opt: [no-new-privileges:true]\n healthcheck:\n test: [\"CMD\", \"bun\", \"-e\", \"const r=await fetch('http://127.0.0.1:5103/readyz'); if(r.status!==204) process.exit(1); await r.body?.cancel()\"]\n interval: 30s\n timeout: 5s\n retries: 3\n start_period: 10s\n stop_grace_period: 30s\n\nnetworks:\n private:\n name: ${ULVIA_PRIVATE_NETWORK}\n internal: true\n instances:\n name: ${ULVIA_INSTANCE_NETWORK}\n","services-tls.yml":"services:\n proxy:\n ports:\n - \"${ULVIA_BIND_ADDRESS}:${ULVIA_HTTPS_PORT}:443\"\n","mongo/provision-provider.js":"const environment = { ...process.env };\n\nfunction required(name) {\n const value = String(environment[name] ?? \"\").trim();\n if (!value) {\n throw new Error(`Missing ${name}`);\n }\n return value;\n}\n\nconst username = required(\"MONGO_PROVIDER_USERNAME\");\nconst password = required(\"MONGO_PROVIDER_PASSWORD\");\nconst admin = db.getSiblingDB(\"admin\");\nconst existing = admin.getUser(username);\nconst roles = [{ role: \"readWriteAnyDatabase\", db: \"admin\" }];\n\nif (existing) {\n admin.updateUser(username, { pwd: password, roles });\n} else {\n admin.createUser({ user: username, pwd: password, roles });\n}\n"},"digest":"sha256:9cfbb82f85da867b0ad3c2b60979867657ac37ee2250e7aac1b94f5a86896e99"}
|