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

copy-utils-generator

v0.0.16

Published

Copy Utilities Generator

Downloads

15

Readme

Copy Utils Generator

JavaのJava Beansをコピーするライブラリ MapStructのコードをExcelの設定ファイルから自動生成するライブラリです。

サンプルサイト

Install

npm install copy-utils-generator
npm install --save-dev pino-pretty (オプション。Logの出力でpino-prettyを使いたい場合のみ。)

コマンド

MapStructのコードを自動生成します。

$ npx generate-mapping --help
Options:
  --version    Show version number                                     [boolean]
  --excelPath  Excel file Path          [string] [default: "./mappingdata.xlsx"]
  --output     Output directory                   [string] [default: "./output"]
  --help       Show help                                               [boolean]
$ 

例:

$ npx generate-mapping --src mappingdata.xlsx --output output/src/main/java/

Java Beansも自動生成します。

$ npx generate-class --help
Options:
  --version    Show version number                                     [boolean]
  --excelPath  Excel file Path            [string] [default: "./classdata.xlsx"]
  --output     Output directory                   [string] [default: "./output"]
  --help       Show help                                               [boolean]

例:

$ npx generate-class --src classdata.xlsx --output output/src/main/java/

Author

👤 Masatomi KINO

🤝 Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

改訂履歴

  • 0.0.15 ヘッダ行の前後スペースを除去するようにした
  • 0.0.14 VOなオブジェクトをTargetにした場合は、xxUpdateは正しく動作しないので(コンパイルエラー)、ExcelファイルにupdateMethod 列(TRUE/FALSE)を追加し、出力を制御できるようにした。
  • 0.0.13 設定ファイルに AllArgsConstructor,Builder の列を追加した。
    • デフォルトはTRUEにしてあるので、今までの設定ファイルはそのまま同じ結果になる
    • TRUE/FALSEを設定する事で、それぞれのアノテーションの出力を制御。
    • ただしBuilderはAllArgsConstructor に依存しているので、Builderが出力される場合はAllArgsConstructorも出力される。
  • 0.0.12 他のライブラリからimportして各クラスをつかえるように。
    • ExcelデータをArrayBufferからもらえるようにした(classDefinitionFactoryExceBufferImpl )。
    • テンプレートを文字列で渡すように仕様変更。ほか。
  • 0.0.10 ESLintとPrettierによるコードフォーマットを実施(ロジックは変更なし)
  • 0.0.9 ログまわりを整理して、利用者が設定変更できるようにした
  • 0.0.8 MapStructコード生成のテンプレートで、<> などがサニタイズされていたバグを修正
  • 0.0.7 クラス生成のテンプレートで、<> などがサニタイズされていたバグを修正
  • 0.0.6 初回リリース

🔧 Logger 設定のカスタマイズ

このライブラリは pino を使ってログを出力しています。 ログ出力レベルやフォーマットを変更したい場合は、config/default.json を作成して設定を記述してください。

{
  "copy-utils-generator-logger": {
    "level": "warn",
    "moduleLogLevels": {
      "groupMappings": "info",
      "FileClassRepository": "info"
    },
    "transport": {
      "target": "pino-pretty",
      "options": {
        "translateTime": "SYS:standard",
        "ignore": "id,hostname",
        "levelFirst": true
      }
    }
  }
}
"level": "warn",  // 全体のログレベルを指定
"moduleLogLevels": // ソースごとにlevelを変えたい場合、この中に記述
"transport":  // pino のtransport設定などを記述
"target": "pino-pretty", // この場合は npm install --save-dev pino-pretty すること

This README was generated by readme-md-generator