@konomi-app/k2 1.4.5 → 1.4.7
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/lib/lint.js
CHANGED
|
@@ -40,7 +40,7 @@ export async function lint() {
|
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
|
-
const results = await eslint.lintFiles(['src/**/*.ts
|
|
43
|
+
const results = await eslint.lintFiles(['src/**/*.{ts,tsx?}']);
|
|
44
44
|
const formatter = await eslint.loadFormatter('stylish');
|
|
45
45
|
const resultText = formatter.format(results);
|
|
46
46
|
console.group('👕 Lint Results');
|
|
@@ -10,7 +10,7 @@ export const copyPluginContents = async (params = {}) => {
|
|
|
10
10
|
await fs.copy(inputDir, outputDir, { overwrite: true });
|
|
11
11
|
const configHtmlPath = path.join(outputDir, 'config.html');
|
|
12
12
|
if (!fs.existsSync(configHtmlPath)) {
|
|
13
|
-
throw new Error(`Plugin HTML file not found. Create "config.html" in ${
|
|
13
|
+
throw new Error(`Plugin HTML file not found. Create "config.html" in ${inputDir}.`);
|
|
14
14
|
}
|
|
15
15
|
const html = await fs.readFile(configHtmlPath, 'utf8');
|
|
16
16
|
const minified = htmlMinifier.minify(html, {
|
|
@@ -2,20 +2,7 @@ import { PLUGIN_CONTENTS_DIRECTORY } from './constants.js';
|
|
|
2
2
|
import { importK2PluginConfig } from './import.js';
|
|
3
3
|
import fs from 'fs-extra';
|
|
4
4
|
import path from 'path';
|
|
5
|
-
|
|
6
|
-
return Object.entries(src).reduce((acc, [key, value]) => {
|
|
7
|
-
if (!dst[key]) {
|
|
8
|
-
return { ...acc, [key]: value };
|
|
9
|
-
}
|
|
10
|
-
if (typeof dst[key] === 'string') {
|
|
11
|
-
return { ...acc, [key]: dst[key] };
|
|
12
|
-
}
|
|
13
|
-
if (Array.isArray(value) && Array.isArray(dst[key])) {
|
|
14
|
-
return { ...acc, [key]: [...value, ...dst[key]] };
|
|
15
|
-
}
|
|
16
|
-
return { ...acc, [key]: merge(src[key], dst[key]) };
|
|
17
|
-
}, {});
|
|
18
|
-
}
|
|
5
|
+
import merge from 'deepmerge';
|
|
19
6
|
export const outputManifest = async (env, options) => {
|
|
20
7
|
const config = options?.config || (await importK2PluginConfig());
|
|
21
8
|
const merged = merge(config.manifest.base, config.manifest[env] || {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konomi-app/k2",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"description": "kintone sdk",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"commander": "^12",
|
|
34
34
|
"css-loader": "^7",
|
|
35
35
|
"cssnano": "^7",
|
|
36
|
+
"deepmerge": "^4.3.1",
|
|
36
37
|
"dotenv": "^16",
|
|
37
38
|
"esbuild": "^0.23",
|
|
38
39
|
"eslint": "^8",
|