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 🙏

© 2025 – Pkg Stats / Ryan Hefner

kintone-source-uploader

v3.0.2

Published

This npm package can upload kintone application customization source code, kintone portal customization source code and kintone plugin.

Readme

kintone-source-uploader

pipeline status coverage report

概要

kintoneの以下のソースコードをアップロードすることが可能です。

  • kintoneプラグイン
  • kintoneアプリカスタマイズ用ソースコード
  • kintoneポータルカスタマイズ用ソースコード

使い方

インストール方法

% npm install --save--dev kintone-source-uploader
or
% npm install -g kintone-source-uploader

kintoneプラグインをアップロードする場合

% ./node_modules/.bin/source-uploader --domain ${yourDomain} --username ${yourLoginName} --password ${yourPassword} ${pluginZipPath}

kintoneアプリカスタマイズ用ソースコードをアップロードする場合

% ./node_modules/.bin/source-uploader --domain ${yourDomain} --username ${yourLoginName} --password ${yourPassword} --customSrc ${manifestFile}

kintoneポータルカスタマイズ用ソースコードをアップロードする場合

% ./node_modules/.bin/source-uploader --domain ${yourDomain} --username ${yourLoginName} --password ${yourPassword} --portalSrc ${manifestFile}

指定できるオプション

|option |必須/任意 |内容 | |---|---|---| |--domain |必須 |kintone利用ドメインを指定します。 | |--username |必須 |kintoneログインユーザー名を指定します。 | |--password |必須 |kintoneログインパスワードを指定します。 | |--proxy |任意 |プロキシ―アドレスを指定します。デフォルトはproxyを設定しません。 | |--watch |任意 |変更を監視して再実行します。値は設定しません。デフォルトはfalseです。 | |--lang |任意 |en or jaを指定します。デフォルトは利用者が普段利用している言語です。 | |--customSrc |任意 |マニフェストファイルを相対パスで指定します。デフォルトは動作しません。ソースコードはmanifestファイルで指定したファイルで全て上書きします。 | |--portalSrc |任意 |マニフェストファイルを相対パスで指定します。デフォルトは動作しません。 「--all true」を指定すると、ソースコードはmanifestファイルで指定したファイルで全て上書きします。--allの指定がない場合、manifestファイルに設定したファイルのみをアップロード/上書きします。| |--all |任意 |ver2.0.3で追加。全体JSをmanifestファイルで指定したファイルで全て上書きします(manifestファイルに指定されていないアップロード済みのソースコードは削除されます)。デフォルトはfalseです。--portalSrcの指定のみ、対応しています。(--diffは使い勝手が悪いため、廃止しました) |

--customSrcと--portalSrcは同時に指定できません。どちらも指定がない場合、プラグインをアップロードします。

--proxyのフォーマット

--proxy http[s]://${proxyUserName}:${proxyPassword}@${proxyDomain}:${proxyPort}

マニフェストファイルのフォーマット

--customSrc(kintoneアプリカスタマイズ用ソースコード)

{
    "app": [アプリID],
    "guest_space_id": [ゲストスペースID],
    "scope": "ALL/ADMIN/NONE",
    "desktop": {
        "js": [
            {
                "type": "URL",
                "url": "https://js.cybozu.com/datatables/v1.10.19/js/jquery.dataTables.min.js" 
            },
            {
                "type": "FILE",
                "file": {
                    "name": "js/desktop/menuManage.js"
                }
            }
        ],
        "css": [
           {
                "type": "URL",
                "url": "https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"
            },
            {
                "type": "FILE",
                "file": {
                    "name": "css/desktop.css"
                }
            }
        ]
    },
    "mobile": {
        "js": [
            {
                "type": "URL",
                "url": "https://js.cybozu.com/datatables/v1.10.19/js/jquery.dataTables.min.js" 
            },
            {
                "type": "FILE",
                "file": {
                    "name": "js/mobile/menuManage.js"
                }
            }
        ],
        "css": [
           {
                "type": "URL",
                "url": "https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"
            },
            {
                "type": "FILE",
                "file": {
                    "name": "css/mobile.css"
                }
            }
        ] 
    }
}
  • 対象がゲストスペース内アプリの場合、guest_space_idにゲストスペースIDを設定します。そうでない場合はguest_space_idに0を指定します。
  • "type": "URL"にCDNを指定します。
  • "type": "FILE"にアップロード対象のファイルをマニフェストファイルからの相対パスで指定します。絶対パスは指定できません。また、マニフェストファイルより上位フォルダにあるファイルの指定はお勧めできません。アップロードできますが、--watchの監視対象から外れます
  • "scope"と"desktop"、"mobile"の意味は以下の記事を参照してください。 https://developer.cybozu.io/hc/ja/articles/204529834

--portalSrc(kintoneポータルカスタマイズ用ソースコード)

{
    "desktop": {
        "js": [
            "lib/def_GlobalAppId.js",
            "js/Desktop/PortalPlugin.js"
        ],
        "css": [
            "css/desktop.css",
            "css/contentHeader.css"
        ]
    },
    "mobile": {
        "js": [
            "def_GlobalAppId.js",
            "js/mobile/PortalPlugin.js"
        ],
        "css": [
            "css/mobile.css",
            "css/contentHeader.css"
        ]
    }
}
  • ソースコードは「すべてのユーザーに適用」されます。
  • "desktop"がデスクトップPC、"mobile"がモバイル端末に適用されます。
  • アップロード対象のファイルをマニフェストファイルからの相対パスで指定します。絶対パスは指定できません。また、マニフェストファイルより上位フォルダにあるファイルの指定はお勧めできません。アップロードできますが、--watchの監視対象から外れます

expamle

プロキシ―の指定

% ./node_modules/.bin/source-uploader --domain example.cybozu.com --username exampleID --password examplePass --proxy http://exampleID:[email protected]:8080 example.zip

watchオプションの指定

% ./node_modules/.bin/source-uploader --domain example.cybozu.com --username exampleID --password examplePass --proxy http://exampleID:[email protected]:8080 --watch --portalSrc manifest.json

--watchオプションはマニフェストファイルの変更も監視します。アップロード対象ファイルの追加、並び替え、削除をしたい場合はマニフェストファイルを変更してください。

出典

本プラグインは「plugin-uploader」のソースコードを流用しています。
https://github.com/kintone/plugin-uploader