@powerhousedao/registry 6.2.3-dev.67 → 6.2.3-dev.68

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/dist/cli.mjs CHANGED
@@ -25,6 +25,7 @@ import { pg_trgm } from "@electric-sql/pglite/contrib/pg_trgm";
25
25
  import { PACKAGE_MODULE_TYPES, slimManifest } from "@powerhousedao/shared/registry";
26
26
  import { create, extract, list } from "tar";
27
27
  import { monitorEventLoopDelay } from "node:perf_hooks";
28
+ import "@renown/sdk";
28
29
  //#endregion
29
30
  //#region ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
30
31
  var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -16730,7 +16731,7 @@ function buildVerdaccioConfig(config) {
16730
16731
  ...storeToken ? { storeToken } : {},
16731
16732
  ...config.renown ? {
16732
16733
  publicUrl: config.renown.publicUrl,
16733
- ...config.renown.renownUrl ? { renownUrl: config.renown.renownUrl } : {}
16734
+ ...config.renown.renownUrls?.length ? { renownUrls: config.renown.renownUrls } : {}
16734
16735
  } : {}
16735
16736
  } } : { htpasswd: { file: htpasswdPath } };
16736
16737
  if (config.s3 && !config.databaseUrl) throw new Error("S3 storage requires a database URL (--database-url)");
@@ -16805,6 +16806,14 @@ function buildVerdaccioConfig(config) {
16805
16806
  return base;
16806
16807
  }
16807
16808
  //#endregion
16809
+ //#region src/auth/renown-verifier.ts
16810
+ function parseRenownUrls(value) {
16811
+ if (!value) return void 0;
16812
+ const urls = value.split(",").map((u) => u.trim().replace(/\/+$/, "")).filter((u) => u.length > 0);
16813
+ const unique = [...new Set(urls)];
16814
+ return unique.length > 0 ? unique : void 0;
16815
+ }
16816
+ //#endregion
16808
16817
  //#region src/worker.ts
16809
16818
  const IDLE_POLL_MS = 2e3;
16810
16819
  const RECONCILE_INTERVAL_MS = 6e4;
@@ -17130,6 +17139,7 @@ async function runRegistry(args) {
17130
17139
  const cdnCachePath = await resolveDir(cdnCacheDir);
17131
17140
  const s3 = s3From(args);
17132
17141
  const renownEnabled = authRenown === true && Boolean(publicUrl);
17142
+ const renownUrls = parseRenownUrls(renownUrl);
17133
17143
  if (authRenown === true && !publicUrl) console.warn("[registry] auth-renown is enabled but --public-url / PH_REGISTRY_PUBLIC_URL is not set; Renown auth will be disabled.");
17134
17144
  if (renownEnabled && !databaseUrl && !authStore) console.warn("[registry] Renown auth requires a database (--database-url) for the auth plugin; renown will be inactive.");
17135
17145
  const localPackagePatterns = localPackages?.split(",").map((p) => p.trim()).filter(Boolean);
@@ -17155,7 +17165,7 @@ async function runRegistry(args) {
17155
17165
  ...localPackagePatterns?.length ? { localPackagePatterns } : {},
17156
17166
  ...renownEnabled && publicUrl ? { renown: {
17157
17167
  publicUrl,
17158
- ...renownUrl ? { renownUrl } : {}
17168
+ ...renownUrls ? { renownUrls } : {}
17159
17169
  } } : {},
17160
17170
  ...s3 ? { s3 } : {},
17161
17171
  ...databaseUrl ? { databaseUrl } : {},
@@ -17597,7 +17607,7 @@ const registryCommand = command({
17597
17607
  renownUrl: option({
17598
17608
  long: "renown-url",
17599
17609
  type: optional(string),
17600
- description: "Renown service base URL for credential verification. Defaults to https://www.renown.id.",
17610
+ description: "Renown service base URL(s), comma-separated. Defaults to https://www.renown.id.",
17601
17611
  defaultValue: () => process.env.PH_REGISTRY_RENOWN_URL,
17602
17612
  defaultValueIsSerializable: true
17603
17613
  }),