@rogatio/cli 6.16.3 → 6.16.4

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.
@@ -531,7 +531,11 @@ function createAIAssistPanel(_container, _editor, onApply, onClose, onSend) {
531
531
  `;
532
532
  const addDetail = (label, value) => {
533
533
  const detail = document.createElement("div");
534
- detail.innerHTML = `<span style="color:#666;">${label}:</span> ${value}`;
534
+ const labelEl = document.createElement("span");
535
+ labelEl.style.color = "#666";
536
+ labelEl.textContent = `${label}:`;
537
+ detail.appendChild(labelEl);
538
+ detail.appendChild(document.createTextNode(` ${value}`));
535
539
  ruleDetails.appendChild(detail);
536
540
  };
537
541
  if (rule.source) {
@@ -20073,7 +20073,7 @@ var require_x509_cjs = __commonJS({
20073
20073
  var _X509Certificate_signature;
20074
20074
  var _X509Certificate_extensions;
20075
20075
  var _X509Certificate_publicKey;
20076
- var X509Certificate5 = class extends PemData {
20076
+ var X509Certificate4 = class extends PemData {
20077
20077
  get publicKey() {
20078
20078
  if (!tslib.__classPrivateFieldGet(this, _X509Certificate_publicKey, "f")) {
20079
20079
  tslib.__classPrivateFieldSet(this, _X509Certificate_publicKey, new PublicKey(this.asn.tbsCertificate.subjectPublicKeyInfo, this.parseOptions), "f");
@@ -20316,7 +20316,7 @@ var require_x509_cjs = __commonJS({
20316
20316
  }
20317
20317
  };
20318
20318
  _X509Certificate_tbs = /* @__PURE__ */ new WeakMap(), _X509Certificate_serialNumber = /* @__PURE__ */ new WeakMap(), _X509Certificate_subjectName = /* @__PURE__ */ new WeakMap(), _X509Certificate_subject = /* @__PURE__ */ new WeakMap(), _X509Certificate_issuerName = /* @__PURE__ */ new WeakMap(), _X509Certificate_issuer = /* @__PURE__ */ new WeakMap(), _X509Certificate_notBefore = /* @__PURE__ */ new WeakMap(), _X509Certificate_notAfter = /* @__PURE__ */ new WeakMap(), _X509Certificate_signatureAlgorithm = /* @__PURE__ */ new WeakMap(), _X509Certificate_signature = /* @__PURE__ */ new WeakMap(), _X509Certificate_extensions = /* @__PURE__ */ new WeakMap(), _X509Certificate_publicKey = /* @__PURE__ */ new WeakMap();
20319
- X509Certificate5.NAME = "Certificate";
20319
+ X509Certificate4.NAME = "Certificate";
20320
20320
  var _X509Certificates_options;
20321
20321
  var X509Certificates = class extends Array {
20322
20322
  constructor(param, options) {
@@ -20324,7 +20324,7 @@ var require_x509_cjs = __commonJS({
20324
20324
  _X509Certificates_options.set(this, void 0);
20325
20325
  if (PemData.isAsnEncoded(param)) {
20326
20326
  this.import(param, options);
20327
- } else if (param instanceof X509Certificate5) {
20327
+ } else if (param instanceof X509Certificate4) {
20328
20328
  this.push(param);
20329
20329
  } else if (Array.isArray(param)) {
20330
20330
  for (const item of param) {
@@ -20362,7 +20362,7 @@ var require_x509_cjs = __commonJS({
20362
20362
  const certificates = [];
20363
20363
  for (const item of signedData.certificates || []) {
20364
20364
  if (item.certificate) {
20365
- certificates.push(new X509Certificate5(item.certificate, options));
20365
+ certificates.push(new X509Certificate4(item.certificate, options));
20366
20366
  }
20367
20367
  }
20368
20368
  this.clear();
@@ -20554,7 +20554,7 @@ var require_x509_cjs = __commonJS({
20554
20554
  throw Error("Cannot convert ASN.1 signature value to WebCrypto format");
20555
20555
  }
20556
20556
  asnX509.signatureValue = asnSignature;
20557
- return new X509Certificate5(asn1Schema.AsnConvert.serialize(asnX509));
20557
+ return new X509Certificate4(asn1Schema.AsnConvert.serialize(asnX509));
20558
20558
  }
20559
20559
  };
20560
20560
  var _X509CrlEntry_serialNumber;
@@ -20775,7 +20775,7 @@ var require_x509_cjs = __commonJS({
20775
20775
  let publicKey;
20776
20776
  const paramsKey = params.publicKey;
20777
20777
  try {
20778
- if (paramsKey instanceof X509Certificate5) {
20778
+ if (paramsKey instanceof X509Certificate4) {
20779
20779
  keyAlgorithm = {
20780
20780
  ...paramsKey.publicKey.algorithm,
20781
20781
  ...paramsKey.signatureAlgorithm
@@ -20979,7 +20979,7 @@ var require_x509_cjs = __commonJS({
20979
20979
  exports.TextObject = TextObject;
20980
20980
  exports.UPN = UPN;
20981
20981
  exports.URL = URL2;
20982
- exports.X509Certificate = X509Certificate5;
20982
+ exports.X509Certificate = X509Certificate4;
20983
20983
  exports.X509CertificateGenerator = X509CertificateGenerator2;
20984
20984
  exports.X509Certificates = X509Certificates;
20985
20985
  exports.X509ChainBuilder = X509ChainBuilder;
@@ -24442,11 +24442,6 @@ function parseMockRedirect(rawUrl) {
24442
24442
  if (!isSingleSegment(token) || !isSingleSegment(digest)) return null;
24443
24443
  return { token, digest };
24444
24444
  }
24445
- function supportedContentType(value) {
24446
- if (value === void 0) return false;
24447
- const mediaType = value.split(";", 1)[0]?.trim().toLowerCase() ?? "";
24448
- return mediaType === "application/json" || mediaType.startsWith("application/") && mediaType.endsWith("+json") || mediaType === "application/x-www-form-urlencoded" || mediaType.startsWith("text/");
24449
- }
24450
24445
  var REGEX_WORKER_SOURCE = `
24451
24446
  const workerThreads =
24452
24447
  typeof process.getBuiltinModule === "function"
@@ -24604,6 +24599,11 @@ function runRegexReplace(text, pattern, replacement, deadlineMs) {
24604
24599
  }
24605
24600
  );
24606
24601
  }
24602
+ function supportedContentType(value) {
24603
+ if (value === void 0) return false;
24604
+ const mediaType = value.split(";", 1)[0]?.trim().toLowerCase() ?? "";
24605
+ return mediaType === "application/json" || mediaType.startsWith("application/") && mediaType.endsWith("+json") || mediaType === "application/x-www-form-urlencoded" || mediaType.startsWith("text/");
24606
+ }
24607
24607
  async function rewriteRequestBody(input, action, captureContext) {
24608
24608
  if (!supportedContentType(input.contentType)) {
24609
24609
  return failure("runtime.request-body-unsupported-mime-type");
@@ -24882,8 +24882,12 @@ async function rewriteResponseBody(input, replacements, replaceAction, captureCo
24882
24882
  for (const entry of replacements) {
24883
24883
  if (entry.pattern.length === 0 || entry.pattern.length > LIMITS.maxResponseBodyPatternLength || entry.replacement.length > LIMITS.maxResponseBodyReplacementLength)
24884
24884
  return failure("runtime.size-limit");
24885
- const regex = new RegExp(entry.pattern, "gu");
24886
- text = text.replace(regex, entry.replacement);
24885
+ text = await runRegexReplace(
24886
+ text,
24887
+ entry.pattern,
24888
+ entry.replacement,
24889
+ RUNTIME_LIMITS.maxRegexDeadlineMs
24890
+ );
24887
24891
  if (new TextEncoder().encode(text).byteLength > RUNTIME_LIMITS.maxResponseBodyBytes)
24888
24892
  return failure("runtime.size-limit");
24889
24893
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rogatio/cli",
3
- "version": "6.16.3",
3
+ "version": "6.16.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Local-first browser request and response rules — editor host, file verification, test runner, and runtime dispatch.",