@bkazemi/verily 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +183 -94
  2. package/dist/browser/mark.d.ts +2 -6
  3. package/dist/browser/mark.js +6 -12
  4. package/dist/browser/provider-mark.d.ts +3 -3
  5. package/dist/browser/provider-mark.js +15 -90
  6. package/dist/instance/auth.d.ts +14 -0
  7. package/dist/instance/auth.js +80 -0
  8. package/dist/instance/bin.d.ts +2 -0
  9. package/dist/instance/bin.js +36 -0
  10. package/dist/instance/cloudflare.d.ts +57 -0
  11. package/dist/instance/cloudflare.js +71 -0
  12. package/dist/instance/env.d.ts +51 -0
  13. package/dist/instance/env.js +84 -0
  14. package/dist/instance/index.d.ts +136 -0
  15. package/dist/instance/index.js +777 -0
  16. package/dist/instance/init.d.ts +6 -0
  17. package/dist/instance/init.js +28 -0
  18. package/dist/instance/limits.d.ts +30 -0
  19. package/dist/instance/limits.js +45 -0
  20. package/dist/instance/node.d.ts +13 -0
  21. package/dist/instance/node.js +43 -0
  22. package/dist/instance/page.d.ts +18 -0
  23. package/dist/instance/page.js +30 -0
  24. package/dist/instance/postgres.d.ts +19 -0
  25. package/dist/instance/postgres.js +83 -0
  26. package/dist/instance/routes.d.ts +7 -0
  27. package/dist/instance/routes.js +22 -0
  28. package/dist/instance/serve.d.ts +31 -0
  29. package/dist/instance/serve.js +49 -0
  30. package/dist/instance/sites.d.ts +169 -0
  31. package/dist/instance/sites.js +413 -0
  32. package/dist/instance/starter.d.ts +6 -0
  33. package/dist/instance/starter.js +99 -0
  34. package/dist/instance/store.d.ts +20 -0
  35. package/dist/instance/store.js +11 -0
  36. package/dist/instance/undici.d.ts +8 -0
  37. package/dist/instance/undici.js +9 -0
  38. package/dist/marks.d.ts +44 -0
  39. package/dist/marks.js +98 -0
  40. package/dist/server/index.js +8 -56
  41. package/dist/server/render.d.ts +49 -0
  42. package/dist/server/render.js +104 -0
  43. package/dist/server/style.d.ts +1 -1
  44. package/dist/server/style.js +122 -1
  45. package/dist/verily.js +96 -104
  46. package/dist/version.d.ts +1 -1
  47. package/dist/version.js +1 -1
  48. package/package.json +30 -2
package/dist/verily.js CHANGED
@@ -9627,9 +9627,9 @@ var Verily = (() => {
9627
9627
  async function read(signed) {
9628
9628
  if (typeof signed !== "string" || signed.length > maxSignedLength) return void 0;
9629
9629
  const text = signed.trim();
9630
- const lines2 = text.split(/\r?\n/);
9631
- const only = (line) => lines2.indexOf(line) === lines2.lastIndexOf(line);
9632
- if (lines2[0] !== "-----BEGIN PGP SIGNED MESSAGE-----" || lines2.at(-1) !== "-----END PGP SIGNATURE-----" || !lines2.includes("-----BEGIN PGP SIGNATURE-----") || ![lines2[0], lines2.at(-1), "-----BEGIN PGP SIGNATURE-----"].every(only))
9630
+ const lines = text.split(/\r?\n/);
9631
+ const only = (line) => lines.indexOf(line) === lines.lastIndexOf(line);
9632
+ if (lines[0] !== "-----BEGIN PGP SIGNED MESSAGE-----" || lines.at(-1) !== "-----END PGP SIGNATURE-----" || !lines.includes("-----BEGIN PGP SIGNATURE-----") || ![lines[0], lines.at(-1), "-----BEGIN PGP SIGNATURE-----"].every(only))
9633
9633
  return void 0;
9634
9634
  try {
9635
9635
  const { pgp, config } = await library();
@@ -9825,12 +9825,75 @@ var Verily = (() => {
9825
9825
  return attestation.hosted ? where : `${where} | Last checked ${when(attestation.confirmedAt)}`;
9826
9826
  }
9827
9827
 
9828
- // src/browser/mark.ts
9828
+ // src/marks.ts
9829
+ var github = {
9830
+ viewBox: "0 0 16 16",
9831
+ paths: [
9832
+ "M6.766 11.328c-2.063-.25-3.516-1.734-3.516-3.656 0-.781.281-1.625.75-2.188-.203-.515-.172-1.609.063-2.062.625-.078 1.468.25 1.968.703.594-.187 1.219-.281 1.985-.281.765 0 1.39.094 1.953.265.484-.437 1.344-.765 1.969-.687.218.422.25 1.515.046 2.047.5.593.766 1.39.766 2.203 0 1.922-1.453 3.375-3.547 3.64.531.344.89 1.094.89 1.954v1.625c0 .468.391.734.86.547C13.781 14.359 16 11.53 16 8.03 16 3.61 12.406 0 7.984 0 3.563 0 0 3.61 0 8.031a7.88 7.88 0 0 0 5.172 7.422c.422.156.828-.125.828-.547v-1.25c-.219.094-.5.156-.75.156-1.031 0-1.64-.562-2.078-1.609-.172-.422-.36-.672-.719-.719-.187-.015-.25-.093-.25-.187 0-.188.313-.328.625-.328.453 0 .844.281 1.25.86.313.452.64.655 1.031.655s.641-.14 1-.5c.266-.265.47-.5.657-.656"
9833
+ ]
9834
+ };
9835
+ var discord = {
9836
+ viewBox: "0 0 24 24",
9837
+ paths: [
9838
+ "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"
9839
+ ]
9840
+ };
9841
+ var youtube = {
9842
+ viewBox: "0 0 24 24",
9843
+ paths: [
9844
+ "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
9845
+ ]
9846
+ };
9847
+ var key = {
9848
+ viewBox: "0 0 16 16",
9849
+ stroke: true,
9850
+ paths: [
9851
+ "M7.4 8.6a3.3 3.3 0 1 0-4.7 4.7 3.3 3.3 0 0 0 4.7-4.7Z",
9852
+ "M7.4 8.6 14 2",
9853
+ "M11.2 4.8l1.6 1.6",
9854
+ "M9.4 6.6l1.6 1.6"
9855
+ ]
9856
+ };
9857
+ var globe = {
9858
+ viewBox: "0 0 16 16",
9859
+ stroke: true,
9860
+ paths: [
9861
+ "M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z",
9862
+ "M1.5 8h13",
9863
+ "M8 1.5C6.1 3.3 5.1 5.5 5.1 8s1 4.7 2.9 6.5",
9864
+ "M8 1.5c1.9 1.8 2.9 4 2.9 6.5s-1 4.7-2.9 6.5"
9865
+ ]
9866
+ };
9867
+ var envelope = {
9868
+ viewBox: "0 0 16 16",
9869
+ stroke: true,
9870
+ paths: ["M2 3.5h12v9H2z", "M2.4 4l5.6 4.6L13.6 4"]
9871
+ };
9872
+ var marks2 = { github, discord, youtube, openpgp: key, email: envelope };
9873
+ function markOf(provider, method) {
9874
+ return marks2[provider] ?? (["backlink", "dns", "wellknown"].includes(method ?? "") ? globe : void 0);
9875
+ }
9876
+ var pathAttributes = (mark) => mark.stroke ? [
9877
+ ["stroke", "currentColor"],
9878
+ ["stroke-width", "1.6"],
9879
+ ["stroke-linecap", "round"],
9880
+ ["stroke-linejoin", "round"]
9881
+ ] : [];
9829
9882
  var tones = {
9830
9883
  current: ["#D3444C", "#149766"],
9831
9884
  inactive: ["#149766", "#D3444C"],
9832
9885
  pending: ["currentColor", "currentColor"]
9833
9886
  };
9887
+ var verification = {
9888
+ viewBox: "-4 -4 264 264",
9889
+ /** The box around the strokes alone: the arms' squared ends and the mitred foot. */
9890
+ strokes: "25.6 29.1 204.8 228",
9891
+ path: "M40 36 128 220 216 36",
9892
+ /** The check's stretch of the V, as a dash along a path measured as 176 long. */
9893
+ check: { pathLength: "176", "stroke-dasharray": "108 176", "stroke-dashoffset": "-54" }
9894
+ };
9895
+
9896
+ // src/browser/mark.ts
9834
9897
  var markStyles = `
9835
9898
  @media (prefers-reduced-motion: no-preference) {
9836
9899
  .mark.current path:last-child { animation: verily-draw .8s cubic-bezier(.65, 0, .35, 1) .1s backwards; }
@@ -9846,20 +9909,18 @@ var Verily = (() => {
9846
9909
  function verificationMark(tone = "current") {
9847
9910
  const namespace2 = "http://www.w3.org/2000/svg";
9848
9911
  const svg = document.createElementNS(namespace2, "svg");
9849
- svg.setAttribute("viewBox", "-4 -4 264 264");
9912
+ svg.setAttribute("viewBox", verification.viewBox);
9850
9913
  svg.setAttribute("fill", "none");
9851
9914
  svg.setAttribute("aria-hidden", "true");
9852
9915
  svg.setAttribute("focusable", "false");
9853
9916
  for (const layer of [0, 1]) {
9854
9917
  const path = document.createElementNS(namespace2, "path");
9855
- path.setAttribute("d", "M40 36 128 220 216 36");
9918
+ path.setAttribute("d", verification.path);
9856
9919
  path.setAttribute("stroke-width", "32");
9857
9920
  path.setAttribute("stroke-linejoin", "miter");
9858
- if (layer === 1) {
9859
- path.setAttribute("pathLength", "176");
9860
- path.setAttribute("stroke-dasharray", "108 176");
9861
- path.setAttribute("stroke-dashoffset", "-54");
9862
- }
9921
+ if (layer === 1)
9922
+ for (const [name, value] of Object.entries(verification.check))
9923
+ path.setAttribute(name, value);
9863
9924
  svg.append(path);
9864
9925
  }
9865
9926
  paintMark(svg, tone);
@@ -9896,92 +9957,23 @@ var Verily = (() => {
9896
9957
 
9897
9958
  // src/browser/provider-mark.ts
9898
9959
  var namespace = "http://www.w3.org/2000/svg";
9899
- function mark() {
9960
+ function providerMark(provider, method) {
9961
+ const mark = markOf(provider, method);
9962
+ if (!mark) return void 0;
9900
9963
  const svg = document.createElementNS(namespace, "svg");
9901
- svg.setAttribute("viewBox", "0 0 16 16");
9964
+ svg.setAttribute("viewBox", mark.viewBox);
9902
9965
  svg.setAttribute("class", "provider");
9903
9966
  svg.setAttribute("aria-hidden", "true");
9904
9967
  svg.setAttribute("focusable", "false");
9905
- return svg;
9906
- }
9907
- function github() {
9908
- const svg = mark();
9909
- const path = document.createElementNS(namespace, "path");
9910
- svg.setAttribute("fill", "currentColor");
9911
- path.setAttribute(
9912
- "d",
9913
- "M6.766 11.328c-2.063-.25-3.516-1.734-3.516-3.656 0-.781.281-1.625.75-2.188-.203-.515-.172-1.609.063-2.062.625-.078 1.468.25 1.968.703.594-.187 1.219-.281 1.985-.281.765 0 1.39.094 1.953.265.484-.437 1.344-.765 1.969-.687.218.422.25 1.515.046 2.047.5.593.766 1.39.766 2.203 0 1.922-1.453 3.375-3.547 3.64.531.344.89 1.094.89 1.954v1.625c0 .468.391.734.86.547C13.781 14.359 16 11.53 16 8.03 16 3.61 12.406 0 7.984 0 3.563 0 0 3.61 0 8.031a7.88 7.88 0 0 0 5.172 7.422c.422.156.828-.125.828-.547v-1.25c-.219.094-.5.156-.75.156-1.031 0-1.64-.562-2.078-1.609-.172-.422-.36-.672-.719-.719-.187-.015-.25-.093-.25-.187 0-.188.313-.328.625-.328.453 0 .844.281 1.25.86.313.452.64.655 1.031.655s.641-.14 1-.5c.266-.265.47-.5.657-.656"
9914
- );
9915
- svg.append(path);
9916
- return svg;
9917
- }
9918
- function discord() {
9919
- const svg = mark();
9920
- const path = document.createElementNS(namespace, "path");
9921
- svg.setAttribute("viewBox", "0 0 24 24");
9922
- svg.setAttribute("fill", "currentColor");
9923
- path.setAttribute(
9924
- "d",
9925
- "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"
9926
- );
9927
- svg.append(path);
9928
- return svg;
9929
- }
9930
- function youtube() {
9931
- const svg = mark();
9932
- const path = document.createElementNS(namespace, "path");
9933
- svg.setAttribute("viewBox", "0 0 24 24");
9934
- svg.setAttribute("fill", "currentColor");
9935
- path.setAttribute(
9936
- "d",
9937
- "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
9938
- );
9939
- svg.append(path);
9940
- return svg;
9941
- }
9942
- function key() {
9943
- return lines([
9944
- "M7.4 8.6a3.3 3.3 0 1 0-4.7 4.7 3.3 3.3 0 0 0 4.7-4.7Z",
9945
- "M7.4 8.6 14 2",
9946
- "M11.2 4.8l1.6 1.6",
9947
- "M9.4 6.6l1.6 1.6"
9948
- ]);
9949
- }
9950
- function globe() {
9951
- return lines([
9952
- "M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z",
9953
- "M1.5 8h13",
9954
- "M8 1.5C6.1 3.3 5.1 5.5 5.1 8s1 4.7 2.9 6.5",
9955
- "M8 1.5c1.9 1.8 2.9 4 2.9 6.5s-1 4.7-2.9 6.5"
9956
- ]);
9957
- }
9958
- function envelope() {
9959
- return lines(["M2 3.5h12v9H2z", "M2.4 4l5.6 4.6L13.6 4"]);
9960
- }
9961
- function lines(paths) {
9962
- const svg = mark();
9963
- svg.setAttribute("fill", "none");
9964
- for (const d2 of paths) {
9968
+ svg.setAttribute("fill", mark.stroke ? "none" : "currentColor");
9969
+ for (const d2 of mark.paths) {
9965
9970
  const path = document.createElementNS(namespace, "path");
9966
9971
  path.setAttribute("d", d2);
9967
- path.setAttribute("stroke", "currentColor");
9968
- path.setAttribute("stroke-width", "1.6");
9969
- path.setAttribute("stroke-linecap", "round");
9970
- path.setAttribute("stroke-linejoin", "round");
9972
+ for (const [name, value] of pathAttributes(mark)) path.setAttribute(name, value);
9971
9973
  svg.append(path);
9972
9974
  }
9973
9975
  return svg;
9974
9976
  }
9975
- function providerMark(provider, method) {
9976
- const marks2 = {
9977
- github,
9978
- discord,
9979
- youtube,
9980
- openpgp: key,
9981
- email: envelope
9982
- };
9983
- return marks2[provider]?.() ?? (["backlink", "dns", "wellknown"].includes(method ?? "") ? globe() : void 0);
9984
- }
9985
9977
 
9986
9978
  // src/browser/badge.ts
9987
9979
  var styles = `
@@ -10134,8 +10126,8 @@ var Verily = (() => {
10134
10126
  }
10135
10127
  function renderBadgePending(element) {
10136
10128
  if (intact(element) && messages.get(element) === pendingKey) return;
10137
- const { pill, mark: mark2 } = frame(element, "pending");
10138
- paintMark(mark2, "pending");
10129
+ const { pill, mark } = frame(element, "pending");
10130
+ paintMark(mark, "pending");
10139
10131
  pill.setAttribute("role", "status");
10140
10132
  pill.setAttribute("aria-label", "Checking verification");
10141
10133
  const divider = span("divider", "");
@@ -10147,8 +10139,8 @@ var Verily = (() => {
10147
10139
  }
10148
10140
  function renderBadgeMessage(element, message) {
10149
10141
  if (intact(element) && messages.get(element) === message) return;
10150
- const { pill, mark: mark2 } = frame(element, "message");
10151
- paintMark(mark2, "inactive");
10142
+ const { pill, mark } = frame(element, "message");
10143
+ paintMark(mark, "inactive");
10152
10144
  pill.setAttribute("tabindex", "0");
10153
10145
  pill.setAttribute("role", "status");
10154
10146
  pill.setAttribute("aria-label", message);
@@ -10175,11 +10167,11 @@ var Verily = (() => {
10175
10167
  const key2 = renderKey(evidence, current, label, more, linked, rows, peek, href);
10176
10168
  if (intact(element) && shown.get(element) === key2) return null;
10177
10169
  const handle = externalName(evidence.external);
10178
- const { pill: badge, mark: mark2 } = frame(element, state, !linked);
10170
+ const { pill: badge, mark } = frame(element, state, !linked);
10179
10171
  const unnamed = Math.max(more - rows.length, 0);
10180
10172
  const named = rows.map((row) => `, ${row.providerName} ${externalName(row.external)}`).join("");
10181
10173
  const others = `${named}${unnamed ? ` and ${unnamed} more` : ""}`;
10182
- paintMark(mark2, current ? "current" : retired ? "pending" : "inactive");
10174
+ paintMark(mark, current ? "current" : retired ? "pending" : "inactive");
10183
10175
  if (linked) {
10184
10176
  badge.href = href;
10185
10177
  badge.rel = "noreferrer";
@@ -10316,9 +10308,9 @@ var Verily = (() => {
10316
10308
  panel.style.left = `${Math.max(edge, Math.min(at2.left, innerWidth - edge - size.width))}px`;
10317
10309
  }
10318
10310
  function renderConnectPill(element) {
10319
- const { pill, mark: mark2 } = frame(element, "connect");
10311
+ const { pill, mark } = frame(element, "connect");
10320
10312
  const button2 = pill;
10321
- paintMark(mark2, "pending");
10313
+ paintMark(mark, "pending");
10322
10314
  button2.type = "button";
10323
10315
  const divider = span("divider", "");
10324
10316
  divider.setAttribute("aria-hidden", "true");
@@ -10528,7 +10520,7 @@ ${claims(evidence)}`;
10528
10520
  }
10529
10521
 
10530
10522
  // src/version.ts
10531
- var version = "v0.7.0";
10523
+ var version = "v0.8.0";
10532
10524
 
10533
10525
  // src/browser/evidence-dialog.ts
10534
10526
  function stampLink() {
@@ -10828,14 +10820,14 @@ ${claims(evidence)}`;
10828
10820
  return control;
10829
10821
  };
10830
10822
  const [named] = removable(evidence);
10831
- const { mark: mark2 } = manage;
10832
- const listable = mark2 !== void 0 && named !== void 0 && !["revoked", "retired"].includes(evidence.status);
10823
+ const { mark } = manage;
10824
+ const listable = mark !== void 0 && named !== void 0 && !["revoked", "retired"].includes(evidence.status);
10833
10825
  const list = (label, as2) => {
10834
10826
  const control = act(label);
10835
10827
  control.onclick = async () => {
10836
10828
  for (const other of row.children) other.disabled = true;
10837
10829
  try {
10838
- await mark2(named, as2);
10830
+ await mark(named, as2);
10839
10831
  } catch {
10840
10832
  offer("That did not go through.");
10841
10833
  }
@@ -10910,7 +10902,7 @@ ${claims(evidence)}`;
10910
10902
  );
10911
10903
  }
10912
10904
  function signedMark(evidence, later, warned) {
10913
- const mark2 = node("span");
10905
+ const mark = node("span");
10914
10906
  const link = outward(node("a", "signed", "signed"), `${evidence.evidenceUrl}#signed`);
10915
10907
  const see = "See the signature (opens in a new tab)";
10916
10908
  const settle = (results) => {
@@ -10919,14 +10911,14 @@ ${claims(evidence)}`;
10919
10911
  const warning = node("span", "bad signature", "signed bad");
10920
10912
  warning.setAttribute("role", "alert");
10921
10913
  warning.title = `This record does not match the signature ${evidence.verifierName} put on it, so it may have been altered. Do not rely on it.`;
10922
- mark2.replaceChildren(warning);
10914
+ mark.replaceChildren(warning);
10923
10915
  warned();
10924
10916
  return;
10925
10917
  }
10926
10918
  if (first?.state === "valid" && results.every((result) => result.state === "valid")) {
10927
10919
  link.textContent = "signed";
10928
10920
  link.title = `Signature checked in this browser against the keys ${new URL(evidence.evidenceUrl).host} publishes (key ${first.keyId}). ${see}`;
10929
- mark2.replaceChildren(link);
10921
+ mark.replaceChildren(link);
10930
10922
  return;
10931
10923
  }
10932
10924
  const why = results.find((result) => result.state === "unchecked");
@@ -10939,11 +10931,11 @@ ${claims(evidence)}`;
10939
10931
  link.textContent = "signed";
10940
10932
  link.append(caution);
10941
10933
  link.title = `${reason} ${see}`;
10942
- mark2.replaceChildren(link);
10934
+ mark.replaceChildren(link);
10943
10935
  if (why) later(() => void signatures(evidence).then(settle));
10944
10936
  };
10945
10937
  void signatures(evidence).then(settle);
10946
- return mark2;
10938
+ return mark;
10947
10939
  }
10948
10940
  function cautionMark() {
10949
10941
  const namespace2 = "http://www.w3.org/2000/svg";
package/dist/version.d.ts CHANGED
@@ -7,4 +7,4 @@
7
7
  * output stays what tsc emitted and nothing has to be substituted into it. A version bump
8
8
  * changes this line with package.json.
9
9
  */
10
- export declare const version = "v0.7.0";
10
+ export declare const version = "v0.8.0";
package/dist/version.js CHANGED
@@ -7,4 +7,4 @@
7
7
  * output stays what tsc emitted and nothing has to be substituted into it. A version bump
8
8
  * changes this line with package.json.
9
9
  */
10
- export const version = 'v0.7.0';
10
+ export const version = 'v0.8.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bkazemi/verily",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Self-hosted account-to-account verification for Node.js",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,7 +30,8 @@
30
30
  "preview": "npm run build && tsx example/preview.ts",
31
31
  "cloudflare:dev": "wrangler dev --local",
32
32
  "cloudflare:check": "wrangler deploy --dry-run --outdir .wrangler/build",
33
- "cloudflare:deploy": "wrangler deploy"
33
+ "starter:check": "rm -rf .wrangler/starter && node dist/instance/bin.js init cloudflare .wrangler/starter && wrangler deploy --dry-run --config .wrangler/starter/wrangler.jsonc --outdir .wrangler/starter-build",
34
+ "release:deploy": "wrangler deploy"
34
35
  },
35
36
  "devDependencies": {
36
37
  "@cloudflare/workers-types": "^5.20260915.1",
@@ -62,6 +63,9 @@
62
63
  "dist",
63
64
  "docs/licenses"
64
65
  ],
66
+ "bin": {
67
+ "verily": "./dist/instance/bin.js"
68
+ },
65
69
  "exports": {
66
70
  ".": {
67
71
  "browser": {
@@ -81,6 +85,30 @@
81
85
  "types": "./dist/site/index.d.ts",
82
86
  "default": "./dist/site/index.js"
83
87
  },
88
+ "./instance": {
89
+ "types": "./dist/instance/index.d.ts",
90
+ "default": "./dist/instance/index.js"
91
+ },
92
+ "./instance/node": {
93
+ "types": "./dist/instance/node.d.ts",
94
+ "default": "./dist/instance/node.js"
95
+ },
96
+ "./instance/postgres": {
97
+ "types": "./dist/instance/postgres.d.ts",
98
+ "default": "./dist/instance/postgres.js"
99
+ },
100
+ "./instance/serve": {
101
+ "types": "./dist/instance/serve.d.ts",
102
+ "default": "./dist/instance/serve.js"
103
+ },
104
+ "./instance/cloudflare": {
105
+ "types": "./dist/instance/cloudflare.d.ts",
106
+ "default": "./dist/instance/cloudflare.js"
107
+ },
108
+ "./instance/undici": {
109
+ "types": "./dist/instance/undici.d.ts",
110
+ "default": "./dist/instance/undici.js"
111
+ },
84
112
  "./verily.js": "./dist/verily.js"
85
113
  }
86
114
  }