npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@entertainment-design-catalog/design-tags

v0.3.0

Published

EDC Web API のスキーマ(Zod)と HTTP リクエストのラッパー

Readme

@entertainment-design-catalog/design-tags

EDC Web API(テキストから DesignTag を分析し、集積する API)の、スキーマ(Zod)と HTTP リクエストのラッパー。 それ以外の機能(サーバーの動き、アプリの機能)は持たない。 スキーマは形だけで、LLM への指示(説明文・プロンプト)は含まない。

使い方

import { EdcApiError, EdcClient } from "@entertainment-design-catalog/design-tags";

const client = new EdcClient({
  baseUrl: "https://<API のホスト>",
  // API キー、または ID トークンを返す関数(リクエストのたびに呼ぶ)
  credential: async () => getIdToken(),
});

try {
  const { id, output, meta } = await client.analyses.create({ text, store: "tags" });
  const saved = await client.analyses.get(id);
  await client.analyses.delete(id); // 取り下げ

  // 似た事例(論文)を探し、後で引き直す(0.3.0)
  const { indexVersion, items } = await client.cases.search({ designTags: output.design_tags.slice(0, 5), limit: 5 });
  const again = await client.cases.get(items[0].case.caseId, { indexVersion }); // { status: "withdrawn" } もある
} catch (error) {
  if (error instanceof EdcApiError && error.code === "budget_exhausted") {
    // error.message は利用者に見せてよい(テキストとして表示する)。error.retryAt は次に試してよい日時
  }
  throw error;
}
  • 実行時の依存は zod(v4、peerDependency)だけ
  • client.analyses・client.cases のメソッドの失敗は、すべて EdcApiError(code、message、retryable、retryAt、status)。code の一覧は docs/contract.md 2.5
  • new EdcClient() の設定の誤り(baseUrl、timeoutMs など)は、作るときに TypeError・RangeError で知らせる
  • error.message はサーバーから来る文字列。画面に出すときは、HTML としてではなくテキストとして扱う(innerHTML や dangerouslySetInnerHTML に入れない)
  • error.cause には、元のエラー(通信の失敗、資格情報の関数が投げたものなど)が入ることがある。ログに出すときは中身に気をつける
  • リダイレクトは追わない。本文が maxResponseBytes(既定 4 MiB)を超えたら読むのをやめる。どちらも invalid_response

ライセンス

MIT