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 🙏

© 2024 – Pkg Stats / Ryan Hefner

kintoneplugin-config-migrator

v0.1.4

Published

"KintonePluginConfigMigrator" is a handy library that allows you to easily export and import plugin configurations to JSON format. With this library, you can save plugin configurations in JSON format for backup purposes or effortless migration to differen

Downloads

11

Readme

KintonePluginConfigMigrator

本ライブラリを利用することで、kintoneプラグインの設定をJSON形式で保存し、バックアップを取ったり、異なる環境へ楽に移行することができます。

設定をエクスポートしてバックアップを作成したり、異なる環境間で設定を簡単に共有する機能を提供します。また、インポート機能を利用すれば、他の環境に設定を即座に適用することができます。

使い方

kintoneプラグインへの適用方法

import { ConfigMigrator } from "kintoneplugin-config-migrator";

(function (PLUGIN_ID: string | undefined) {
    // メイン処理
    // ...

    // ConfigMigratorの初期化とボタンの設置
    const migrator = new ConfigMigrator(PLUGIN_ID)
    migrator.put_forms('config_body')
})(kintone.$PLUGIN_ID);

kintoneプラグインのメイン処理の中で呼び出せます。コンストラクタに与えるPLUGIN_IDはkintoneプラグインの初期化時に得られる情報を与えてください。

put_forms('config_body')ではインポート/エクスポートボタンを配置します。引数に渡したHTML要素IDにappendChild()する形でボタンを持ったHTML要素を配置します。

プラグイン設定の取得について

kintone APIを使ってファイル保存、ファイル読み込みをしています。特に複雑なことはしていません。

エクスポートの処理

kitnone plugin APIのgetConfig()を使って取得した設定をそのままダウンロードしています。

const CONF = kintone.plugin.app.getConfig(plugin_id);

インポートの処理

同じくkintone plugin APIのsetConfig()でアップロードしたjsonをそのまま格納しています。

const jsonData = JSON.parse(event.target.result);
kintone.plugin.app.setConfig(jsonData, function () {
    alert('🆙 プラグイン設定を保存しました。アプリの更新をお忘れなく!');
    window.location.href = '../../flow?app=' + kintone.app.getId();
});

License

このライブラリはMITライセンスの元で公開しています。 This plugin is licensed under MIT license.

Copyright (c) 2023 Daisuke Motohashi https://opensource.org/licenses/MIT

このライブラリについて

このライブラリは株式会社モノサスのキン担ラボ活動の一環として作成しました。