@ai-ecoverse/slicc-spectrum 1.101.2 → 1.101.3
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/README.md +1 -0
- package/dist/slicc-dummy.js +5 -4
- package/dist/slicc-dummy.js.map +3 -3
- package/dist/slicc-ui.js +28 -12
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/updates.d.ts +2 -2
- package/package.json +2 -2
package/dist/slicc-ui.js
CHANGED
|
@@ -44976,27 +44976,43 @@ var newer = (a23, b13) => {
|
|
|
44976
44976
|
var certBlock = /<!--\s*cert-verify\s*-->([\s\S]*?)<!--\s*\/cert-verify\s*-->/g;
|
|
44977
44977
|
var notesLimit = 8192;
|
|
44978
44978
|
var noted = /* @__PURE__ */ new WeakMap();
|
|
44979
|
-
|
|
44980
|
-
|
|
44979
|
+
var bare = (version2) => version2.replace(/^v/, "");
|
|
44980
|
+
function trusted(url) {
|
|
44981
|
+
try {
|
|
44982
|
+
const { protocol, host: host4, username, password, pathname } = new URL(url);
|
|
44983
|
+
const [owner2, repo, kind] = pathname.split("/").slice(1);
|
|
44984
|
+
return protocol === "https:" && host4 === "github.com" && !username && !password && owner2.toLowerCase() === "ai-ecoverse" && Boolean(repo) && kind === "releases";
|
|
44985
|
+
} catch {
|
|
44986
|
+
return false;
|
|
44987
|
+
}
|
|
44988
|
+
}
|
|
44989
|
+
function vouches(inner, release3, name) {
|
|
44990
|
+
const token2 = /^certified\s+(\S+)/.exec(inner.trim())?.[1] ?? "";
|
|
44991
|
+
const at = token2.lastIndexOf("@");
|
|
44992
|
+
const named2 = token2.slice(0, at);
|
|
44993
|
+
return at > 0 && bare(token2.slice(at + 1)) === bare(release3.version) && (name === void 0 || named2 === name);
|
|
44994
|
+
}
|
|
44995
|
+
function releaseNotes(release3, name) {
|
|
44996
|
+
const cache5 = noted.get(release3) ?? /* @__PURE__ */ new Map();
|
|
44997
|
+
noted.set(release3, cache5);
|
|
44998
|
+
const known = cache5.get(name);
|
|
44981
44999
|
if (known) return known;
|
|
44982
45000
|
const text5 = release3.notes ?? "";
|
|
44983
|
-
const certified = [...text5.matchAll(certBlock)].some(
|
|
44984
|
-
([, inner]) => /^certified\b/.test(inner.trim())
|
|
44985
|
-
);
|
|
45001
|
+
const certified = trusted(release3.url) && [...text5.matchAll(certBlock)].some(([, inner]) => vouches(inner, release3, name));
|
|
44986
45002
|
const lines = text5.replace(certBlock, "").trim().split("\n");
|
|
44987
|
-
const heading = /^#{1,6}\s/.test(lines[0]) && lines[0].includes(release3.version
|
|
45003
|
+
const heading = /^#{1,6}\s/.test(lines[0]) && lines[0].includes(bare(release3.version));
|
|
44988
45004
|
const full = lines.slice(heading ? 1 : 0).join("\n").trim();
|
|
44989
45005
|
const cut = full.length > notesLimit;
|
|
44990
45006
|
const head2 = full.slice(0, notesLimit);
|
|
44991
45007
|
const line = head2.lastIndexOf("\n");
|
|
44992
45008
|
const body4 = cut ? `${(line > notesLimit / 2 ? head2.slice(0, line) : head2).trimEnd()}\u2026` : full;
|
|
44993
45009
|
const notes2 = { release: release3, body: body4, certified, cut };
|
|
44994
|
-
|
|
45010
|
+
cache5.set(name, notes2);
|
|
44995
45011
|
return notes2;
|
|
44996
45012
|
}
|
|
44997
|
-
function whatsNew(releases, from, to) {
|
|
45013
|
+
function whatsNew(releases, from, to, name) {
|
|
44998
45014
|
if (!releases || from === null || to === null || to === from) return [];
|
|
44999
|
-
const range3 = releases.filter((release3) => newer(release3.version, from) > 0 && newer(release3.version, to) <= 0).sort((a23, b13) => newer(b13.version, a23.version)).map(releaseNotes);
|
|
45015
|
+
const range3 = releases.filter((release3) => newer(release3.version, from) > 0 && newer(release3.version, to) <= 0).sort((a23, b13) => newer(b13.version, a23.version)).map((release3) => releaseNotes(release3, name));
|
|
45000
45016
|
return range3.some((entry) => entry.body) ? range3 : [];
|
|
45001
45017
|
}
|
|
45002
45018
|
var secure = (url) => /^https:\/\//i.test(url);
|
|
@@ -45660,7 +45676,7 @@ var SliccUpdates = class extends ModelElement {
|
|
|
45660
45676
|
${item2.commands.length ? b`<p class="commands"><span class="hidden">Commands: </span>${item2.commands.map(
|
|
45661
45677
|
(command3) => b`<code>${command3}</code>`
|
|
45662
45678
|
)}</p>` : A}
|
|
45663
|
-
${this.#whatsNew(`releases:package:${item2.id}`, item2.label, whatsNew(item2.releases, item2.version, item2.offered), 4)}
|
|
45679
|
+
${this.#whatsNew(`releases:package:${item2.id}`, item2.label, whatsNew(item2.releases, item2.version, item2.offered, item2.package), 4)}
|
|
45664
45680
|
${this.#packageProgress(item2)}
|
|
45665
45681
|
${error ? b`<div class="error" role="alert" data-error>
|
|
45666
45682
|
<swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle>
|
|
@@ -46759,7 +46775,7 @@ function protects(path2, whole) {
|
|
|
46759
46775
|
return rulePaths.some((rule) => glob.test(rule)) || top !== path2 && pattern(top).test("/etc/fnox") || whole && ruleParents.some((parent) => glob.test(parent));
|
|
46760
46776
|
}
|
|
46761
46777
|
var command2 = (word) => word.split("/").pop() ?? "";
|
|
46762
|
-
var
|
|
46778
|
+
var trusted2 = (word) => readOnly.includes(word.replace(/^\/(?:usr\/)?bin\/(?=[^/]+$)/, ""));
|
|
46763
46779
|
var expansion = /\$\([^)]*\)?|\$\{[^}]*\}?|\$[\w@*#?$!-]*|`[^`]*`?/;
|
|
46764
46780
|
function moved(cwds, word) {
|
|
46765
46781
|
for (const cwd of [...cwds]) {
|
|
@@ -46883,7 +46899,7 @@ function reach2(command3, cwd) {
|
|
|
46883
46899
|
const plain2 = text5.split(separators).map((segment2) => commas(segment2.split(/[\s<>=]+/).map((word) => word.replace(/['"\\]/g, ""))));
|
|
46884
46900
|
const aware = shield(text5).split(separators).map((segment2) => commas(quoted(unshield(segment2))));
|
|
46885
46901
|
const segments = JSON.stringify(aware) === JSON.stringify(plain2) ? plain2 : [...plain2, ...aware];
|
|
46886
|
-
const whole = segments.some((words2) => words2.length > 0 && !
|
|
46902
|
+
const whole = segments.some((words2) => words2.length > 0 && !trusted2(words2[0]));
|
|
46887
46903
|
for (const words2 of segments) {
|
|
46888
46904
|
const hit = scan2(words2, cwds, whole);
|
|
46889
46905
|
if (hit) return hit;
|