@cyaxis/ulvia 1.0.18 → 1.0.19

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 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/e5bd135c8e692867eb6fc298ff6c36be0c4ad6cc/docs/development/README.md).
28
+ see [development](https://github.com/matthias-bernouy/CMS/blob/c4d018ad50e01e8250b43fbb04c26337027d77da/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` saves a CMS PAT supplied by `--token-stdin` or
111
- `ULVIA_REPOSITORY_TOKEN`, pinned to the origin and Repository identity. Ordinary
112
- Repository accounts can claim namespaces and publish. Logout removes the local
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 --token-stdin
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/e5bd135c8e692867eb6fc298ff6c36be0c4ad6cc/docs/development/sdk-releases.md) for explicit versions,
155
+ [SDK workflow](https://github.com/matthias-bernouy/CMS/blob/c4d018ad50e01e8250b43fbb04c26337027d77da/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/e5bd135c8e692867eb6fc298ff6c36be0c4ad6cc/docs/blocs/examples.md) for source and release formats.
286
+ [collection examples](https://github.com/matthias-bernouy/CMS/blob/c4d018ad50e01e8250b43fbb04c26337027d77da/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/e5bd135c8e692867eb6fc298ff6c36be0c4ad6cc/packages/features/hosting/docs/management/zones.md).
34
+ disabled zone rotates its proof. See the [zone workflow](https://github.com/matthias-bernouy/CMS/blob/c4d018ad50e01e8250b43fbb04c26337027d77da/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/delivery-performance/latest.json` by the runner. They describe the
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.18", injectedStackVersion = "1.0.18", CLI_VERSION, DEFAULT_STACK_VERSION;
119
+ var injectedCliVersion = "1.0.19", injectedStackVersion = "1.0.19", 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
- Provide it through ULVIA_REPOSITORY_TOKEN or bounded stdin; never as an argument.
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.18", stackApi: 1, files: { "services.yml": `services:
6795
+ return typeof { schema: "ulvia.stack-release.v1", version: "1.0.19", 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:a9fd578b61fdb69c1f2aa16729b3d7831b77c7f29ace4b8ac3a1991a5d21bb31" } === "object" ? parseStackRelease({ schema: "ulvia.stack-release.v1", version: "1.0.18", stackApi: 1, files: { "services.yml": `services:
6962
+ ` }, digest: "sha256:f85f54724d50f49622d3cbb23a52f57369cbea3a1364673f4fc622d4ef392552" } === "object" ? parseStackRelease({ schema: "ulvia.stack-release.v1", version: "1.0.19", 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:a9fd578b61fdb69c1f2aa16729b3d7831b77c7f29ace4b8ac3a1991a5d21bb31" }) : undefined;
7129
+ ` }, digest: "sha256:f85f54724d50f49622d3cbb23a52f57369cbea3a1364673f4fc622d4ef392552" }) : 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")])));
@@ -39372,10 +39447,8 @@ var init_nativeReferences = __esm(() => {
39372
39447
  });
39373
39448
 
39374
39449
  // packages/features/content/src/blocs/core/markup/validation/nativeContent.ts
39375
- function validatePageContentMarkup(value) {
39376
- const normalized = validateNativeMarkup(value, "content");
39377
- const { document: document2 } = parseHTML("<!DOCTYPE html><html><head></head><body></body></html>");
39378
- document2.body.innerHTML = normalized;
39450
+ function validatePageContentDocument(value) {
39451
+ const document2 = validateNativeDocument(value, "content");
39379
39452
  for (const node of Array.from(document2.body.childNodes)) {
39380
39453
  if (node.nodeType === 3 && node.textContent?.trim()) {
39381
39454
  throw new ContentValidationError("content", "Page root text must be owned by a Bloc slot", {
@@ -39386,7 +39459,7 @@ function validatePageContentMarkup(value) {
39386
39459
  throw new ContentValidationError("content", `native <${node.localName}> cannot be a Page root without cms-bloc`, { code: "page.root_bloc", parameters: { tag: node.localName } });
39387
39460
  }
39388
39461
  }
39389
- return normalized;
39462
+ return document2;
39390
39463
  }
39391
39464
  function validateBlocContentMarkup(value, options) {
39392
39465
  const html = validateNativeMarkup(value, options.field, options.kind === "default" ? options.ownerTag : undefined, {
@@ -39424,6 +39497,9 @@ function extractMutations(document2) {
39424
39497
  return bindings.filter((mutation) => !mutation.contractId.startsWith("edge."));
39425
39498
  }
39426
39499
  function validateNativeMarkup(value, field, rootParentTag, options = {}, enforceBlocBudgets = false) {
39500
+ return validateNativeDocument(value, field, rootParentTag, options, enforceBlocBudgets).body.innerHTML;
39501
+ }
39502
+ function validateNativeDocument(value, field, rootParentTag, options = {}, enforceBlocBudgets = false) {
39427
39503
  if (enforceBlocBudgets) {
39428
39504
  assertBlocMarkupLength(field, value);
39429
39505
  }
@@ -39447,7 +39523,7 @@ function validateNativeMarkup(value, field, rootParentTag, options = {}, enforce
39447
39523
  throw new ContentValidationError(field, issue, { code: "page.html_invalid", parameters: { field } });
39448
39524
  }
39449
39525
  validateNativeDocumentReferences(document2, field);
39450
- return document2.body.innerHTML;
39526
+ return document2;
39451
39527
  }
39452
39528
  function containsComment(root) {
39453
39529
  for (const child of Array.from(root.childNodes)) {
@@ -39654,14 +39730,9 @@ var init_contentRefs = __esm(() => {
39654
39730
  });
39655
39731
 
39656
39732
  // packages/features/content/src/blocs/core/markup/validation/managedNativeElements.ts
39657
- function managedNativeElementIssue(content, contracts, options = {}) {
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;
39733
+ function managedNativeDocumentIssue(root, contracts, options = {}) {
39663
39734
  const hostsById = new Map;
39664
- for (const host of document2.body.querySelectorAll("[cms-bloc]")) {
39735
+ for (const host of root.querySelectorAll("[cms-bloc]")) {
39665
39736
  const id = host.getAttribute("cms-bloc");
39666
39737
  const hosts = hostsById.get(id) ?? [];
39667
39738
  hosts.push(host);
@@ -39837,24 +39908,30 @@ function expandCompositions(root, definitions, mode = "render", origins) {
39837
39908
  const idScope = createTemplateIdScope(root);
39838
39909
  const budget = origins ? { remaining: 50000, characters: 4 * 1024 * 1024 } : undefined;
39839
39910
  const expansionLimit = markups.size * 100 + 1000;
39840
- for (let count = 0;count < expansionLimit; count++) {
39841
- const host = nextComposition(root, markups, expanded);
39842
- if (!host) {
39843
- return;
39911
+ const pending = [];
39912
+ pushElements(pending, Array.from(root.childNodes));
39913
+ let count = 0;
39914
+ while (pending.length) {
39915
+ const host = pending.pop();
39916
+ const id = host.getAttribute("cms-bloc")?.toLowerCase();
39917
+ if (!id || !markups.has(id) || expanded.has(host) || host.hasAttribute(COMPOSITION_RUNTIME_ATTRIBUTE)) {
39918
+ pushElements(pending, Array.from(host.childNodes));
39919
+ continue;
39844
39920
  }
39845
39921
  expanded.add(host);
39846
- expandHost(host, markups.get(host.getAttribute("cms-bloc")), mode, idScope, origins, budget);
39922
+ const inserted = expandHost(host, markups.get(host.getAttribute("cms-bloc")), mode, idScope, origins, budget);
39923
+ if (++count === expansionLimit) {
39924
+ throw new Error("Composition expansion exceeded its safety limit; check for a recursive composition dependency");
39925
+ }
39926
+ pushElements(pending, inserted);
39847
39927
  }
39848
- throw new Error("Composition expansion exceeded its safety limit; check for a recursive composition dependency");
39849
39928
  }
39850
- function nextComposition(root, markups, expanded) {
39851
- for (const element of Array.from(root.querySelectorAll("[cms-bloc]"))) {
39852
- const id = element.getAttribute("cms-bloc")?.toLowerCase();
39853
- if (id && markups.has(id) && !expanded.has(element) && !element.hasAttribute(COMPOSITION_RUNTIME_ATTRIBUTE)) {
39854
- return element;
39929
+ function pushElements(pending, nodes) {
39930
+ for (let index = nodes.length - 1;index >= 0; index--) {
39931
+ if (nodes[index].nodeType === 1) {
39932
+ pending.push(nodes[index]);
39855
39933
  }
39856
39934
  }
39857
- return null;
39858
39935
  }
39859
39936
  function expandHost(host, definition, mode, idScope, origins, budget) {
39860
39937
  const document2 = host.ownerDocument;
@@ -39891,17 +39968,18 @@ function expandHost(host, definition, mode, idScope, origins, budget) {
39891
39968
  applyRootMarker(host, template.content);
39892
39969
  if (mode === "render") {
39893
39970
  host.replaceChildren(...Array.from(template.content.childNodes));
39894
- return;
39971
+ return Array.from(host.childNodes);
39895
39972
  }
39896
39973
  host.replaceChildren(input, document2.createComment(COMPONENT_OUTPUT_START), ...Array.from(template.content.childNodes), document2.createComment(COMPONENT_OUTPUT_END));
39897
39974
  host.setAttribute(COMPOSITION_RUNTIME_ATTRIBUTE, "");
39898
39975
  host.setAttribute(COMPONENT_COMPOSITION_ATTRIBUTE, "");
39899
- return;
39976
+ return Array.from(host.childNodes);
39900
39977
  }
39901
39978
  if (mode === "render") {
39902
39979
  propagateHostSlot(host, template.content);
39903
- host.replaceWith(...Array.from(template.content.childNodes));
39904
- return;
39980
+ const inserted = Array.from(template.content.childNodes);
39981
+ host.replaceWith(...inserted);
39982
+ return inserted;
39905
39983
  }
39906
39984
  const output = document2.createElement("cms-composition-output");
39907
39985
  output.setAttribute(COMPOSITION_OUTPUT_ATTRIBUTE, "");
@@ -39909,6 +39987,7 @@ function expandHost(host, definition, mode, idScope, origins, budget) {
39909
39987
  output.append(...Array.from(template.content.childNodes));
39910
39988
  host.replaceChildren(input, output);
39911
39989
  host.setAttribute(COMPOSITION_RUNTIME_ATTRIBUTE, "");
39990
+ return Array.from(host.childNodes);
39912
39991
  }
39913
39992
  function applyRootMarker(host, fragment) {
39914
39993
  const marker = fragment.querySelector("template[cms-root]");
@@ -40976,15 +41055,14 @@ function validatePageDocument(html, blocs, options = {}) {
40976
41055
  throw new ContentValidationError("content", error instanceof Error ? error.message : "invalid server text placement");
40977
41056
  }
40978
41057
  validateHosts(preflight, available, new Map((options.unresolvedBlocs ?? []).map((bloc) => [bloc.id, bloc])), true);
40979
- const normalized = validatePageContentMarkup(html);
41058
+ const document2 = validatePageContentDocument(html);
41059
+ const normalized = document2.body.innerHTML;
40980
41060
  const unresolved = new Map((options.unresolvedBlocs ?? []).map((bloc) => [bloc.id, bloc]));
40981
41061
  const uses = [...extractRefs(normalized).blocs].sort();
40982
41062
  const missing = uses.filter((tag) => !available.has(tag) && !unresolved.has(tag));
40983
41063
  if (missing.length > 0) {
40984
41064
  throw new ContentValidationError("content", `unknown or hidden reference(s): ${missing.map((tag) => `bloc "${tag}"`).join(", ")}`, { code: "page.bloc_unknown", parameters: { bloc: missing.join(", ") } });
40985
41065
  }
40986
- const { document: document2 } = parseHTML("<!DOCTYPE html><html><head></head><body></body></html>");
40987
- document2.body.innerHTML = normalized;
40988
41066
  const queries = extractQueries(document2);
40989
41067
  const mutations = extractMutations(document2);
40990
41068
  if (options.capabilities || options.requireCapabilityResolution) {
@@ -40993,7 +41071,7 @@ function validatePageDocument(html, blocs, options = {}) {
40993
41071
  validateRoots(document2, available, new Set(visible.keys()), new Set(unresolved.keys()));
40994
41072
  validateHiddenNesting(document2, hidden, available);
40995
41073
  validateHosts(document2, available, unresolved);
40996
- validateManagedNative(normalized, [...blocs, ...options.hiddenBlocs ?? []]);
41074
+ validateManagedNative(document2.body, [...blocs, ...options.hiddenBlocs ?? []]);
40997
41075
  return { html: document2.body.innerHTML, queries, mutations, uses };
40998
41076
  }
40999
41077
  function validateHiddenNesting(document2, hidden, available) {
@@ -41034,8 +41112,8 @@ function validateHosts(document2, known, unresolved, allowUnknown = false) {
41034
41112
  }
41035
41113
  }
41036
41114
  }
41037
- function validateManagedNative(html, blocs) {
41038
- const issue = managedNativeElementIssue(html, blocs.map((bloc) => ({ id: bloc.id, root: bloc.root })));
41115
+ function validateManagedNative(root, blocs) {
41116
+ const issue = managedNativeDocumentIssue(root, blocs.map((bloc) => ({ id: bloc.id, root: bloc.root })));
41039
41117
  if (issue) {
41040
41118
  throw new ContentValidationError("content", issue);
41041
41119
  }
@@ -41519,7 +41597,7 @@ function validateFragment(html, ownerTag, known, unresolved, allowOwnedNative) {
41519
41597
  document2.body.innerHTML = html;
41520
41598
  validateReferences(html, document2, ownerTag, known, unresolved);
41521
41599
  validateHostAttributes(document2, known, unresolved, true, true);
41522
- validateManagedNative2(html, known);
41600
+ validateManagedNative2(document2.body, known);
41523
41601
  for (const heading of Array.from(document2.body.querySelectorAll("h1, h2, h3, h4, h5, h6"))) {
41524
41602
  if (!heading.hasAttribute("cms-bloc")) {
41525
41603
  throw new ContentValidationError("fixedContent", `fixed Bloc markup cannot own <${heading.localName}>; place an explicit heading Bloc instead`);
@@ -41549,7 +41627,7 @@ function validateDefaultContent(owner, html, known, unresolved) {
41549
41627
  document2.body.append(root);
41550
41628
  validateReferences(html, document2, owner.id, known, unresolved);
41551
41629
  validateHostAttributes(document2, known, unresolved, false);
41552
- validateManagedNative2(document2.body.innerHTML, known);
41630
+ validateManagedNative2(document2.body, known);
41553
41631
  const host = document2.body.firstElementChild;
41554
41632
  const issue = blocHostContractIssue(host, owner, known, unresolved);
41555
41633
  if (issue) {
@@ -41589,8 +41667,8 @@ function validateHostAttributes(document2, known, unresolved, fragmentOwned, all
41589
41667
  }
41590
41668
  }
41591
41669
  }
41592
- function validateManagedNative2(html, known) {
41593
- const issue = managedNativeElementIssue(html, [...known.values()].map((bloc) => ({ id: bloc.id, root: bloc.root })));
41670
+ function validateManagedNative2(root, known) {
41671
+ const issue = managedNativeDocumentIssue(root, [...known.values()].map((bloc) => ({ id: bloc.id, root: bloc.root })));
41594
41672
  if (issue) {
41595
41673
  throw new ContentValidationError("content", issue);
41596
41674
  }
@@ -41619,6 +41697,8 @@ var init_assertContentRefsExist = __esm(() => {
41619
41697
  init_expandedPageDocument();
41620
41698
  init_diagnostics();
41621
41699
  init_svgCapabilities();
41700
+ init_bindingAnalysis();
41701
+ init_esm7();
41622
41702
  });
41623
41703
 
41624
41704
  // packages/features/content/src/pages/core/routing/analysis/fragmentIndexCache.ts
@@ -41830,31 +41910,43 @@ function cssReferences(value) {
41830
41910
  });
41831
41911
  return result;
41832
41912
  }
41833
- function assertTokenColors(declaration, path) {
41913
+ function assertTokenColors(declaration, path, isColor = (name) => lexer.matchType("color", { type: "Identifier", name }).error === null) {
41834
41914
  walk2(declaration.value, (node) => {
41835
41915
  if (node.type === "Function" || node.type === "Identifier") {
41836
41916
  node.name = ident.decode(node.name);
41837
41917
  }
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()) && lexer.matchType("color", node).error === null;
41918
+ 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
41919
  if (literal || node.type === "Raw" || node.type === "Function" && node.name.toLowerCase() === "attr") {
41840
41920
  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
41921
  }
41842
41922
  });
41843
41923
  }
41844
41924
  function colorVariables(declarations, theme) {
41925
+ const identifiers = new Map;
41926
+ const isColor = (name) => {
41927
+ const cached = identifiers.get(name);
41928
+ if (cached !== undefined) {
41929
+ return cached;
41930
+ }
41931
+ const result = lexer.matchType("color", { type: "Identifier", name }).error === null;
41932
+ if (name.length <= 256 && identifiers.size < 256) {
41933
+ identifiers.set(name, result);
41934
+ }
41935
+ return result;
41936
+ };
41845
41937
  const aliases = new Map;
41846
41938
  const reached = new Set;
41847
41939
  const graph = new Map;
41848
41940
  for (const entry of declarations) {
41849
41941
  const { declaration, path } = entry;
41850
41942
  if (declaration.property.startsWith("--")) {
41851
- assertTokenColors(declaration, path);
41943
+ assertTokenColors(declaration, path, isColor);
41852
41944
  const name = declaration.property.slice(2);
41853
41945
  const values = aliases.get(name) ?? [];
41854
41946
  values.push(entry);
41855
41947
  aliases.set(name, values);
41856
41948
  } else if (blocStylePaintProperty(declaration.property.toLowerCase())) {
41857
- assertTokenColors(declaration, path);
41949
+ assertTokenColors(declaration, path, isColor);
41858
41950
  for (const name of cssReferences(declaration.value)) {
41859
41951
  reached.add(name);
41860
41952
  }
@@ -41864,8 +41956,7 @@ function colorVariables(declarations, theme) {
41864
41956
  if (theme.has(name)) {
41865
41957
  continue;
41866
41958
  }
41867
- for (const { declaration, path } of aliases.get(name) ?? []) {
41868
- assertTokenColors(declaration, path);
41959
+ for (const { declaration } of aliases.get(name) ?? []) {
41869
41960
  for (const dependency of cssReferences(declaration.value)) {
41870
41961
  reached.add(dependency);
41871
41962
  if (!theme.has(dependency)) {
@@ -47156,9 +47247,10 @@ function snapshotCollectionAssets(declarations, assets, limits) {
47156
47247
  });
47157
47248
  return Object.freeze(snapshots.sort((left, right) => ordinal(left.id, right.id)));
47158
47249
  }
47159
- async function verifyCollectionAssets(declarations, snapshots) {
47250
+ async function verifyCollectionAssets(declarations, snapshots, signal) {
47160
47251
  const supplied = new Map(snapshots.map((asset) => [asset.id, asset.bytes]));
47161
47252
  for (const declaration of declarations) {
47253
+ signal?.throwIfAborted();
47162
47254
  const path = `$.assets.${declaration.id}`;
47163
47255
  const bytes = supplied.get(declaration.id);
47164
47256
  if (!bytes || bytes.size !== declaration.byteLength) {
@@ -47166,6 +47258,7 @@ async function verifyCollectionAssets(declarations, snapshots) {
47166
47258
  }
47167
47259
  const content = new Uint8Array(await bytes.arrayBuffer());
47168
47260
  const digest = await sha256Digest(content);
47261
+ signal?.throwIfAborted();
47169
47262
  if (digest !== declaration.digest) {
47170
47263
  mismatch("asset digest mismatch", path);
47171
47264
  }
@@ -1 +1 @@
1
- {"schema":"ulvia.stack-release.v1","version":"1.0.18","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:a9fd578b61fdb69c1f2aa16729b3d7831b77c7f29ace4b8ac3a1991a5d21bb31"}
1
+ {"schema":"ulvia.stack-release.v1","version":"1.0.19","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:f85f54724d50f49622d3cbb23a52f57369cbea3a1364673f4fc622d4ef392552"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyaxis/ulvia",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Ulvia CMS installation and release CLI.",
5
5
  "license": "MIT",
6
6
  "type": "module",