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

@serverkit-lib/logic-module-client

v0.0.88

Published

Serverkit IDE Module Package Template

Downloads

18

Readme

logic-module-client

version Node.js build license

소개

이 모듈(logic-module-client)은 Built-in 모듈 및 노드(metadata)를 추출하고, 관련된 인터페이스를 제공하는 기능을 담고 있습니다. 아래에서는 export된 주요 요소인 IBuiltInModule, IBuiltInNode, getMetadata 함수에 대한 설명과 사용법을 다룹니다.

인터페이스

IBuiltInModule

설명: Built-in 모듈을 표현하는 인터페이스입니다. modules/builtInModules 디렉토리에 위치한 .js 파일들을 스캔하여 관련 정보를 추출하고, 이를 구조화하여 제공합니다.

프로퍼티:

  • _id: string
    모듈을 식별할 수 있는 고유 ID (일반적으로 파일명에서 확장자를 제외한 값)
  • category: string[]
    모듈의 카테고리를 나타내는 문자열 배열. 예를 들어 math.add.js 파일의 경우 ["math"]가 카테고리가 될 수 있습니다.
  • explain: IExplainI18n
    국제화 모듈(i18n)을 위한 다양한 언어로 구성된 설명문 객체. 모듈의 용도나 기능에 대한 정보가 담겨 있습니다.
  • templateSignature: string[]
    모듈에 정의된 제네릭 템플릿 시그니처를 담는 배열. 템플릿 파라미터 등의 타입 정보가 포함될 수 있습니다.
  • param: IBuiltInModuleParamReturn[]
    모듈에 대한 파라미터 정보 배열. 파라미터의 이름, 타입, 설명 등이 포함됩니다.
  • return: IBuiltInModuleParamReturn[]
    모듈 실행 결과로 반환되는 값에 대한 정보 배열. 반환값의 타입 및 설명 등이 포함됩니다.
  • callback: string[]
    모듈 실행 중 호출되는 콜백 함수 목록. 콜백 관련 정보가 문자열 배열 형태로 담겨집니다.

예제:

const module: IBuiltInModule = {
    _id: "array.app",
    category: ["Array"],
    explain: {
        ko: "주어진 배열값의 특정 index에 해당하는 값을 가져옵니다.",
        en: "Retrieves the value at a specific index in a given array."
    },
    templateSignature: ["<T extends number>"],
    param: [
        { name: "array", type: { for: "array", signature: "T" } },
        { name: "index", type: "number" }
    ],
    return: [{ name: "result", type: { signature: "T" } }],
    callback: []
};

IBuiltInNode

설명:
modules/builtInNodes 디렉토리에 위치한 .xml 파일로부터 노드 메타데이터를 추출하고, 이를 JSON 형태로 제공하는 인터페이스입니다.

프로퍼티:

  • _id: string
    노드를 식별할 수 있는 고유 ID (노드 파일명에서 확장자를 제외한 값)
  • explain: IExplainI18n
    국제화 모듈(i18n)을 위한 다양한 언어로 구성된 설명문 객체. 노드의 용도나 기능에 대한 정보가 담겨 있습니다.
  • Node: Record<string, any>
    XML 파일 파싱 결과를 담고 있는 객체로, 노드의 속성 및 구조적인 정보가 포함됩니다.

예시:

const node: IBuiltInNode = {
    _id: "exampleNode",
    explain: {
        ko: "예시 노드입니다.",
        en: "This is example Node."
    },
    Node: {
        Node: {
            $: { type: "action" },
            Property: [{ $: { name: "speed", value: "10" } }]
        }
    }
};

getMetadata

설명:
getMetadata() 함수는 modules/builtInModulesmodules/builtInNodes 디렉토리 내의 .js, .xml 파일을 스캔하여 Built-in 모듈 및 노드의 메타데이터를 추출하는 비동기 함수입니다. 이 함수는 모든 메타데이터를 수집한 뒤, 모듈과 노드에 대한 배열 형태의 결과를 반환합니다.

시그니처:

async function getMetadata(): Promise<{ modules: IBuiltInModule[]; nodes: IBuiltInNode[] }>;

반환값:

  • modules: IBuiltInModule[]
    modules/builtInModules 디렉토리에서 추출한 모든 Built-in 모듈 메타데이터를 담은 배열입니다.

  • nodes: IBuiltInNode[]
    modules/builtInNodes 디렉토리에서 추출한 모든 Built-in 노드 메타데이터를 담은 배열입니다.

(async () => {
    const { modules, nodes } = await getMetadata();

    // 모듈 정보 출력
    modules.forEach(mod => {
        console.log(`Module ID: ${mod._id}`);
        console.log(`Category: ${mod.category.join(", ")}`);
        console.log(`Description: ${mod.explain}`);
    });

    // 노드 정보 출력
    nodes.forEach(node => {
        console.log(`Node ID: ${node._id}`);
        console.log("Node Content:", node.Node);
    });
})();