@konomi-app/kintone-utilities 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export type { kintoneAPI } from './api-types';
2
2
  export * from './utilities';
3
3
  export * from './event-listener';
4
+ export * from './plugin';
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './utilities';
2
2
  export * from './event-listener';
3
+ export * from './plugin';
3
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * プラグインがアプリ単位で保存している設定情報を返却します
3
+ */
4
+ export declare const restoreStorage: <T = any>(id: string) => T | null;
package/dist/plugin.js ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * プラグインがアプリ単位で保存している設定情報を返却します
3
+ */
4
+ export const restoreStorage = (id) => {
5
+ const config = kintone.plugin.app.getConfig(id);
6
+ if (!Object.keys(config).length) {
7
+ return null;
8
+ }
9
+ return Object.entries(config).reduce((acc, [key, value]) => ({ ...acc, [key]: JSON.parse(value) }), {});
10
+ };
11
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAU,EAAU,EAAY,EAAE;IAC9D,MAAM,MAAM,GAA2B,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACxE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE;QAC/B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAClC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,EAC7D,EAAE,CACH,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konomi-app/kintone-utilities",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "repository": "https://github.com/local-bias/kintone-utilities.git",