@t2000/cli 9.14.0 → 10.0.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.
@@ -12197,27 +12197,27 @@ async function commerceFetchJson(url, init) {
12197
12197
  }
12198
12198
  return json;
12199
12199
  }
12200
- async function listOfferings(base, filter = {}) {
12200
+ async function listServices(base, filter = {}) {
12201
12201
  const params = new URLSearchParams();
12202
12202
  if (filter.agent) params.set("agent", filter.agent);
12203
12203
  if (filter.query) params.set("q", filter.query);
12204
12204
  const qs = params.size > 0 ? `?${params.toString()}` : "";
12205
- const json = await commerceFetchJson(`${base}/offerings${qs}`);
12206
- const offerings = json.offerings ?? [];
12207
- return { total: json.total ?? offerings.length, offerings };
12205
+ const json = await commerceFetchJson(`${base}/services${qs}`);
12206
+ const services = json.services ?? [];
12207
+ return { total: json.total ?? services.length, services };
12208
12208
  }
12209
- async function fetchOffering(base, agent, slug) {
12210
- const { offerings: rows } = await listOfferings(base, { agent });
12209
+ async function fetchService(base, agent, slug) {
12210
+ const { services: rows } = await listServices(base, { agent });
12211
12211
  const match = rows.find((o) => o.slug === slug.trim().toLowerCase());
12212
12212
  if (!match) {
12213
12213
  const live = rows.filter((o) => !o.retired).map((o) => o.slug);
12214
12214
  throw new Error(
12215
- `Agent ${truncateAddress(agent)} has no offering "${slug}".` + (live.length > 0 ? ` Live offerings: ${live.join(", ")}` : "")
12215
+ `Agent ${truncateAddress(agent)} has no service "${slug}".` + (live.length > 0 ? ` Live services: ${live.join(", ")}` : "")
12216
12216
  );
12217
12217
  }
12218
12218
  if (match.retired) {
12219
12219
  throw new Error(
12220
- `Offering "${slug}" is retired \u2014 the seller no longer sells it.`
12220
+ `Service "${slug}" is retired \u2014 the seller no longer sells it.`
12221
12221
  );
12222
12222
  }
12223
12223
  return match;
@@ -12820,8 +12820,8 @@ export {
12820
12820
  jobActionsFor,
12821
12821
  verifyJobForSeller,
12822
12822
  DEFAULT_COMMERCE_API_BASE,
12823
- listOfferings,
12824
- fetchOffering,
12823
+ listServices,
12824
+ fetchService,
12825
12825
  putJobSpec,
12826
12826
  getJobSpec,
12827
12827
  SPONSORED_PYTH_DEPENDENT_PROVIDERS,
@@ -12863,4 +12863,4 @@ export {
12863
12863
  @scure/bip39/index.js:
12864
12864
  (*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
12865
12865
  */
12866
- //# sourceMappingURL=chunk-W2YJBW55.js.map
12866
+ //# sourceMappingURL=chunk-45A36TR5.js.map