@konomi-app/k2 1.10.0 → 1.11.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/package.json +1 -1
- package/dist/commands/build-base.d.ts +0 -6
- package/dist/commands/build-base.d.ts.map +0 -1
- package/dist/commands/build-base.js +0 -7
- package/dist/commands/build-base.js.map +0 -1
- package/dist/commands/build-esbuild.d.ts +0 -7
- package/dist/commands/build-esbuild.d.ts.map +0 -1
- package/dist/commands/build-esbuild.js +0 -63
- package/dist/commands/build-esbuild.js.map +0 -1
- package/dist/commands/build-tailwind.d.ts +0 -2
- package/dist/commands/build-tailwind.d.ts.map +0 -1
- package/dist/commands/build-tailwind.js +0 -18
- package/dist/commands/build-tailwind.js.map +0 -1
- package/dist/commands/build.d.ts +0 -7
- package/dist/commands/build.d.ts.map +0 -1
- package/dist/commands/build.js +0 -52
- package/dist/commands/build.js.map +0 -1
- package/dist/commands/dev/index.d.ts +0 -9
- package/dist/commands/dev/index.d.ts.map +0 -1
- package/dist/commands/dev/index.js +0 -60
- package/dist/commands/dev/index.js.map +0 -1
- package/dist/commands/dev/tailwind.d.ts +0 -5
- package/dist/commands/dev/tailwind.d.ts.map +0 -1
- package/dist/commands/dev/tailwind.js +0 -30
- package/dist/commands/dev/tailwind.js.map +0 -1
- package/dist/commands/dev-base-esbuild.d.ts +0 -8
- package/dist/commands/dev-base-esbuild.d.ts.map +0 -1
- package/dist/commands/dev-base-esbuild.js +0 -18
- package/dist/commands/dev-base-esbuild.js.map +0 -1
- package/dist/commands/genkey-base.d.ts +0 -4
- package/dist/commands/genkey-base.d.ts.map +0 -1
- package/dist/commands/genkey-base.js +0 -19
- package/dist/commands/genkey-base.js.map +0 -1
- package/dist/commands/genkey.d.ts +0 -5
- package/dist/commands/genkey.d.ts.map +0 -1
- package/dist/commands/genkey.js +0 -14
- package/dist/commands/genkey.js.map +0 -1
- package/dist/commands/lint.d.ts +0 -8
- package/dist/commands/lint.d.ts.map +0 -1
- package/dist/commands/lint.js +0 -20
- package/dist/commands/lint.js.map +0 -1
- package/dist/commands/manifest/index.d.ts +0 -2
- package/dist/commands/manifest/index.d.ts.map +0 -1
- package/dist/commands/manifest/index.js +0 -29
- package/dist/commands/manifest/index.js.map +0 -1
- package/dist/commands/plugin-build.d.ts +0 -3
- package/dist/commands/plugin-build.d.ts.map +0 -1
- package/dist/commands/plugin-build.js +0 -60
- package/dist/commands/plugin-build.js.map +0 -1
- package/dist/commands/plugin-dev/create-manifest.d.ts +0 -5
- package/dist/commands/plugin-dev/create-manifest.d.ts.map +0 -1
- package/dist/commands/plugin-dev/create-manifest.js +0 -30
- package/dist/commands/plugin-dev/create-manifest.js.map +0 -1
- package/dist/commands/plugin-dev/index.d.ts +0 -5
- package/dist/commands/plugin-dev/index.d.ts.map +0 -1
- package/dist/commands/plugin-dev/index.js +0 -50
- package/dist/commands/plugin-dev/index.js.map +0 -1
- package/dist/commands/plugin-dev/tailwind.d.ts +0 -2
- package/dist/commands/plugin-dev/tailwind.d.ts.map +0 -1
- package/dist/commands/plugin-dev/tailwind.js +0 -42
- package/dist/commands/plugin-dev/tailwind.js.map +0 -1
- package/dist/commands/plugin-dev/upload.d.ts +0 -5
- package/dist/commands/plugin-dev/upload.d.ts.map +0 -1
- package/dist/commands/plugin-dev/upload.js +0 -58
- package/dist/commands/plugin-dev/upload.js.map +0 -1
- package/dist/commands/plugin-esbuild.d.ts +0 -3
- package/dist/commands/plugin-esbuild.d.ts.map +0 -1
- package/dist/commands/plugin-esbuild.js +0 -66
- package/dist/commands/plugin-esbuild.js.map +0 -1
- package/dist/commands/plugin-genkey.d.ts +0 -3
- package/dist/commands/plugin-genkey.d.ts.map +0 -1
- package/dist/commands/plugin-genkey.js +0 -13
- package/dist/commands/plugin-genkey.js.map +0 -1
- package/dist/commands/plugin-init.d.ts +0 -3
- package/dist/commands/plugin-init.d.ts.map +0 -1
- package/dist/commands/plugin-init.js +0 -45
- package/dist/commands/plugin-init.js.map +0 -1
- package/dist/commands/plugin-tsup.d.ts +0 -3
- package/dist/commands/plugin-tsup.d.ts.map +0 -1
- package/dist/commands/plugin-tsup.js +0 -65
- package/dist/commands/plugin-tsup.js.map +0 -1
- package/dist/commands/plugin-zip.d.ts +0 -2
- package/dist/commands/plugin-zip.d.ts.map +0 -1
- package/dist/commands/plugin-zip.js +0 -46
- package/dist/commands/plugin-zip.js.map +0 -1
- package/dist/commands/test/index.d.ts +0 -3
- package/dist/commands/test/index.d.ts.map +0 -1
- package/dist/commands/test/index.js +0 -17
- package/dist/commands/test/index.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -15
- package/dist/index.js.map +0 -1
- package/dist/lib/cert.d.ts +0 -4
- package/dist/lib/cert.d.ts.map +0 -1
- package/dist/lib/cert.js +0 -16
- package/dist/lib/cert.js.map +0 -1
- package/dist/lib/constants.d.ts +0 -13
- package/dist/lib/constants.d.ts.map +0 -1
- package/dist/lib/constants.js +0 -14
- package/dist/lib/constants.js.map +0 -1
- package/dist/lib/esbuild.d.ts +0 -6
- package/dist/lib/esbuild.d.ts.map +0 -1
- package/dist/lib/esbuild.js +0 -39
- package/dist/lib/esbuild.js.map +0 -1
- package/dist/lib/exec.d.ts +0 -3
- package/dist/lib/exec.d.ts.map +0 -1
- package/dist/lib/exec.js +0 -4
- package/dist/lib/exec.js.map +0 -1
- package/dist/lib/import.d.ts +0 -4
- package/dist/lib/import.d.ts.map +0 -1
- package/dist/lib/import.js +0 -18
- package/dist/lib/import.js.map +0 -1
- package/dist/lib/k2.d.ts +0 -2
- package/dist/lib/k2.d.ts.map +0 -1
- package/dist/lib/k2.js +0 -9
- package/dist/lib/k2.js.map +0 -1
- package/dist/lib/kintone-api-client.d.ts +0 -57
- package/dist/lib/kintone-api-client.d.ts.map +0 -1
- package/dist/lib/kintone-api-client.js +0 -95
- package/dist/lib/kintone-api-client.js.map +0 -1
- package/dist/lib/lint.d.ts +0 -2
- package/dist/lib/lint.d.ts.map +0 -1
- package/dist/lib/lint.js +0 -28
- package/dist/lib/lint.js.map +0 -1
- package/dist/lib/plugin-contents.d.ts +0 -5
- package/dist/lib/plugin-contents.d.ts.map +0 -1
- package/dist/lib/plugin-contents.js +0 -28
- package/dist/lib/plugin-contents.js.map +0 -1
- package/dist/lib/plugin-manifest.d.ts +0 -4
- package/dist/lib/plugin-manifest.d.ts.map +0 -1
- package/dist/lib/plugin-manifest.js +0 -13
- package/dist/lib/plugin-manifest.js.map +0 -1
- package/dist/lib/tailwind.d.ts +0 -33
- package/dist/lib/tailwind.d.ts.map +0 -1
- package/dist/lib/tailwind.js +0 -91
- package/dist/lib/tailwind.js.map +0 -1
- package/dist/lib/tsup.d.ts +0 -3
- package/dist/lib/tsup.d.ts.map +0 -1
- package/dist/lib/tsup.js +0 -26
- package/dist/lib/tsup.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -16
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -66
- package/dist/lib/utils.js.map +0 -1
- package/dist/lib/webpack.d.ts +0 -6
- package/dist/lib/webpack.d.ts.map +0 -1
- package/dist/lib/webpack.js +0 -72
- package/dist/lib/webpack.js.map +0 -1
- package/dist/lib/zip.d.ts +0 -4
- package/dist/lib/zip.d.ts.map +0 -1
- package/dist/lib/zip.js +0 -65
- package/dist/lib/zip.js.map +0 -1
- package/dist/plugin.d.ts +0 -3
- package/dist/plugin.d.ts.map +0 -1
- package/dist/plugin.js +0 -25
- package/dist/plugin.js.map +0 -1
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { outputManifest } from '../../lib/plugin-manifest.js';
|
|
2
|
-
export const getManifest = async (params) => {
|
|
3
|
-
const { config, port } = params;
|
|
4
|
-
return outputManifest('dev', {
|
|
5
|
-
config: {
|
|
6
|
-
...config,
|
|
7
|
-
manifest: {
|
|
8
|
-
...config.manifest,
|
|
9
|
-
dev: {
|
|
10
|
-
config: {
|
|
11
|
-
...config.manifest?.dev?.config,
|
|
12
|
-
js: [`https://localhost:${port}/config.js`],
|
|
13
|
-
css: [`https://localhost:${port}/config.css`],
|
|
14
|
-
},
|
|
15
|
-
desktop: {
|
|
16
|
-
...config.manifest?.dev?.desktop,
|
|
17
|
-
js: [`https://localhost:${port}/desktop.js`],
|
|
18
|
-
css: [`https://localhost:${port}/desktop.css`],
|
|
19
|
-
},
|
|
20
|
-
mobile: {
|
|
21
|
-
...config.manifest?.dev?.mobile,
|
|
22
|
-
js: [`https://localhost:${port}/desktop.js`],
|
|
23
|
-
css: [`https://localhost:${port}/desktop.css`],
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=create-manifest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-manifest.js","sourceRoot":"","sources":["../../../src/commands/plugin-dev/create-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAAE,MAAoD,EAAE,EAAE;IACxF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAChC,OAAO,cAAc,CAAC,KAAK,EAAE;QAC3B,MAAM,EAAE;YACN,GAAG,MAAM;YACT,QAAQ,EAAE;gBACR,GAAG,MAAM,CAAC,QAAQ;gBAClB,GAAG,EAAE;oBACH,MAAM,EAAE;wBACN,GAAG,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM;wBAC/B,EAAE,EAAE,CAAC,qBAAqB,IAAI,YAAY,CAAC;wBAC3C,GAAG,EAAE,CAAC,qBAAqB,IAAI,aAAa,CAAC;qBAC9C;oBACD,OAAO,EAAE;wBACP,GAAG,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO;wBAChC,EAAE,EAAE,CAAC,qBAAqB,IAAI,aAAa,CAAC;wBAC5C,GAAG,EAAE,CAAC,qBAAqB,IAAI,cAAc,CAAC;qBAC/C;oBACD,MAAM,EAAE;wBACN,GAAG,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM;wBAC/B,EAAE,EAAE,CAAC,qBAAqB,IAAI,aAAa,CAAC;wBAC5C,GAAG,EAAE,CAAC,qBAAqB,IAAI,cAAc,CAAC;qBAC/C;iBACF;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin-dev/index.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,OAAO,UAAU,OAAO,SAU9B;AAED,wBAAsB,MAAM,CAAC,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,iBAqBpD"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { program } from 'commander';
|
|
2
|
-
import {} from 'esbuild';
|
|
3
|
-
import fs from 'fs-extra';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import { DEFAULT_PORT, PLUGIN_DEVELOPMENT_DIRECTORY, PLUGIN_WORKSPACE_DIRECTORY, } from '../../lib/constants.js';
|
|
6
|
-
import { importK2PluginConfig } from '../../lib/import.js';
|
|
7
|
-
import base from '../dev-base-esbuild.js';
|
|
8
|
-
import { getManifest } from './create-manifest.js';
|
|
9
|
-
import { watchCss } from './tailwind.js';
|
|
10
|
-
import { watchContentsAndUploadZip } from './upload.js';
|
|
11
|
-
export default function command() {
|
|
12
|
-
program
|
|
13
|
-
.command('dev')
|
|
14
|
-
.option('-p, --ppk <ppk>', '.ppk file path', path.join(PLUGIN_WORKSPACE_DIRECTORY, 'private.ppk'))
|
|
15
|
-
.description('Start development server.')
|
|
16
|
-
.action(action);
|
|
17
|
-
}
|
|
18
|
-
export async function action(options) {
|
|
19
|
-
console.group('🍳 Start development server');
|
|
20
|
-
try {
|
|
21
|
-
const { ppk: ppkPath } = options;
|
|
22
|
-
const config = await importK2PluginConfig();
|
|
23
|
-
if (!fs.existsSync(PLUGIN_DEVELOPMENT_DIRECTORY)) {
|
|
24
|
-
await fs.mkdir(PLUGIN_DEVELOPMENT_DIRECTORY, { recursive: true });
|
|
25
|
-
}
|
|
26
|
-
const port = config.server?.port ?? DEFAULT_PORT;
|
|
27
|
-
const manifest = await getManifest({ config, port });
|
|
28
|
-
console.log(`📝 manifest.json generated`);
|
|
29
|
-
Promise.all([watchContentsAndUploadZip({ manifest, ppkPath }), watchCss(config), build(port)]);
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
throw error;
|
|
33
|
-
}
|
|
34
|
-
finally {
|
|
35
|
-
console.groupEnd();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
async function build(port) {
|
|
39
|
-
const entryPoints = ['desktop', 'config'].map((dir) => ({
|
|
40
|
-
in: path.join('src', dir, 'index.ts'),
|
|
41
|
-
out: dir,
|
|
42
|
-
}));
|
|
43
|
-
base({
|
|
44
|
-
port,
|
|
45
|
-
entryPoints,
|
|
46
|
-
certDir: PLUGIN_WORKSPACE_DIRECTORY,
|
|
47
|
-
staticDir: PLUGIN_DEVELOPMENT_DIRECTORY,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/plugin-dev/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAqB,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBA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C,CAAC;IACjG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,KAAK,CAAC;IACd,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,QAAQ,EAAE,CAAC;IACrB,CAAC;AACH,CAAC;AAED,KAAK,UAAU,KAAK,CAAC,IAAY;IAC/B,MAAM,WAAW,GAAgC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACnF,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,CAAC;QACrC,GAAG,EAAE,GAAG;KACT,CAAC,CAAC,CAAC;IAEJ,IAAI,CAAC;QACH,IAAI;QACJ,WAAW;QACX,OAAO,EAAE,0BAA0B;QACnC,SAAS,EAAE,4BAA4B;KACxC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin-dev/tailwind.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,QAAQ,GAAU,cAAc,MAAM,CAAC,IAAI,CAAC,MAAM,sFAqB9D,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import {} from 'tailwindcss';
|
|
3
|
-
import { PLUGIN_DEVELOPMENT_DIRECTORY } from '../../lib/constants.js';
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import { getTailwindConfig, getTailwindInputCss, watchTailwindCSS } from '../../lib/tailwind.js';
|
|
6
|
-
async function buildTailwindCSS(params) {
|
|
7
|
-
const { inputFile, outputFileName, config } = params;
|
|
8
|
-
const inputPath = path.resolve(inputFile);
|
|
9
|
-
const outputPath = path.join(PLUGIN_DEVELOPMENT_DIRECTORY, outputFileName);
|
|
10
|
-
return watchTailwindCSS({
|
|
11
|
-
input: inputPath,
|
|
12
|
-
output: outputPath,
|
|
13
|
-
config,
|
|
14
|
-
onChanges: ({ output, type }) => {
|
|
15
|
-
const outputFileName = path.basename(output);
|
|
16
|
-
console.log(chalk.hex('#e5e7eb')(`${new Date().toLocaleTimeString()} `) +
|
|
17
|
-
chalk.cyan(`[css] `) +
|
|
18
|
-
outputFileName +
|
|
19
|
-
(type === 'init' ? ' init' : ` rebuilt`));
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
export const watchCss = async (pluginConfig) => {
|
|
24
|
-
if (!pluginConfig.tailwind?.css || !pluginConfig.tailwind?.config) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const tailwindConfig = await getTailwindConfig(pluginConfig.tailwind);
|
|
28
|
-
const inputFile = getTailwindInputCss(pluginConfig.tailwind);
|
|
29
|
-
return Promise.all([
|
|
30
|
-
buildTailwindCSS({
|
|
31
|
-
inputFile: inputFile.desktop,
|
|
32
|
-
outputFileName: 'desktop.css',
|
|
33
|
-
config: tailwindConfig.desktop,
|
|
34
|
-
}),
|
|
35
|
-
buildTailwindCSS({
|
|
36
|
-
inputFile: inputFile.config,
|
|
37
|
-
outputFileName: 'config.css',
|
|
38
|
-
config: tailwindConfig.config,
|
|
39
|
-
}),
|
|
40
|
-
]);
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=tailwind.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind.js","sourceRoot":"","sources":["../../../src/commands/plugin-dev/tailwind.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAiC,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEjG,KAAK,UAAU,gBAAgB,CAAC,MAI/B;IACC,MA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E,cAAc,CAAC,OAAO;SAC/B,CAAC;QACF,gBAAgB,CAAC;YACf,SAAS,EAAE,SAAS,CAAC,MAAM;YAC3B,cAAc,EAAE,YAAY;YAC5B,MAAM,EAAE,cAAc,CAAC,MAAM;SAC9B,CAAC;KACH,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin-dev/upload.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,yBAAyB,GAAU,QAAQ;IACtD,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB,kBA6DA,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import packer from '@kintone/plugin-packer';
|
|
2
|
-
import { copyPluginContents } from '../../lib/plugin-contents.js';
|
|
3
|
-
import { getContentsZipBuffer, getZipFileNameSuffix, outputContentsZip } from '../../lib/zip.js';
|
|
4
|
-
import fs from 'fs-extra';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
import { PLUGIN_WORKSPACE_DIRECTORY } from '../../lib/constants.js';
|
|
7
|
-
import { apiUploadZip } from '../../lib/utils.js';
|
|
8
|
-
import chokider from 'chokidar';
|
|
9
|
-
import chalk from 'chalk';
|
|
10
|
-
export const watchContentsAndUploadZip = async (params) => {
|
|
11
|
-
const { manifest, ppkPath } = params;
|
|
12
|
-
let initialScanComplete = false;
|
|
13
|
-
const contentsListener = async () => {
|
|
14
|
-
try {
|
|
15
|
-
if (!initialScanComplete) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
await copyPluginContents();
|
|
19
|
-
console.log(chalk.hex('#e5e7eb')(`${new Date().toLocaleTimeString()} `) +
|
|
20
|
-
chalk.cyan(`[contents] `) +
|
|
21
|
-
`updated`);
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
console.error('Error copying plugin contents:', error);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
try {
|
|
28
|
-
await outputContentsZip(manifest);
|
|
29
|
-
const buffer = await getContentsZipBuffer();
|
|
30
|
-
const pluginPrivateKey = await fs.readFile(path.resolve(ppkPath), 'utf8');
|
|
31
|
-
const output = await packer(buffer, pluginPrivateKey);
|
|
32
|
-
const zipFileName = `plugin${getZipFileNameSuffix('dev')}.zip`;
|
|
33
|
-
await fs.writeFile(path.join(PLUGIN_WORKSPACE_DIRECTORY, zipFileName), output.plugin);
|
|
34
|
-
const { method } = await apiUploadZip({ env: 'dev', pluginId: output.id });
|
|
35
|
-
console.log(chalk.hex('#e5e7eb')(`${new Date().toLocaleTimeString()} `) +
|
|
36
|
-
chalk.cyan(`[upload] `) +
|
|
37
|
-
`uploaded ${method === 'POST' ? '(new)' : '(update)'}`);
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
console.log(chalk.hex('#e5e7eb')(`${new Date().toLocaleTimeString()} `) +
|
|
41
|
-
chalk.cyan(`[upload] `) +
|
|
42
|
-
chalk.red(`failed`) +
|
|
43
|
-
chalk.hex('#e5e7eb')(`: ${error?.message ?? 'Unknown error'}`));
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const contentsWatcher = chokider.watch(['src/contents/**/*'], {
|
|
47
|
-
ignored: /node_modules/,
|
|
48
|
-
persistent: true,
|
|
49
|
-
});
|
|
50
|
-
contentsWatcher.on('ready', () => {
|
|
51
|
-
initialScanComplete = true;
|
|
52
|
-
contentsListener();
|
|
53
|
-
});
|
|
54
|
-
contentsWatcher.on('change', contentsListener);
|
|
55
|
-
contentsWatcher.on('add', contentsListener);
|
|
56
|
-
contentsWatcher.on('unlink', contentsListener);
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=upload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../src/commands/plugin-dev/upload.ts"],"names":[],"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,OAAO,EAAE,cAAc;QACvB,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;IAEH,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QAC/B,mBAAmB,GAAG,IAAI,CAAC;QAC3B,gBAAgB,EAAE,CAAC;IACrB,CAAC,CAAC,CAAC;IAEH,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;IAC/C,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IAC5C,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;AACjD,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-esbuild.d.ts","sourceRoot":"","sources":["../../src/commands/plugin-esbuild.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,OAAO,SAK9B;AAED,wBAAsB,MAAM,kBAuD3B"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { program } from 'commander';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { PLUGIN_CONTENTS_DIRECTORY } from '../lib/constants.js';
|
|
5
|
-
import { importK2PluginConfig } from '../lib/import.js';
|
|
6
|
-
import { getTailwindConfig, getTailwindInputCss, outputCss } from '../lib/tailwind.js';
|
|
7
|
-
import {} from 'esbuild';
|
|
8
|
-
import { buildWithEsbuild } from '../lib/esbuild.js';
|
|
9
|
-
import { lint } from '../lib/lint.js';
|
|
10
|
-
export default function command() {
|
|
11
|
-
program
|
|
12
|
-
.command('esbuild')
|
|
13
|
-
.description("Build the project for production. (It's a wrapper of webpack build command.)")
|
|
14
|
-
.action(action);
|
|
15
|
-
}
|
|
16
|
-
export async function action() {
|
|
17
|
-
console.group('🍳 Build the project for production');
|
|
18
|
-
try {
|
|
19
|
-
const config = await importK2PluginConfig();
|
|
20
|
-
if (config?.lint?.build) {
|
|
21
|
-
await lint();
|
|
22
|
-
console.log('✨ Lint success.');
|
|
23
|
-
}
|
|
24
|
-
if (!fs.existsSync(PLUGIN_CONTENTS_DIRECTORY)) {
|
|
25
|
-
await fs.mkdir(PLUGIN_CONTENTS_DIRECTORY, { recursive: true });
|
|
26
|
-
}
|
|
27
|
-
if (config.tailwind?.css && config.tailwind?.config) {
|
|
28
|
-
const tailwindConfig = await getTailwindConfig(config.tailwind);
|
|
29
|
-
const inputFile = getTailwindInputCss(config.tailwind);
|
|
30
|
-
await outputCss({
|
|
31
|
-
inputPath: inputFile.config,
|
|
32
|
-
outputPath: path.join(PLUGIN_CONTENTS_DIRECTORY, 'config.css'),
|
|
33
|
-
config: tailwindConfig.config,
|
|
34
|
-
minify: true,
|
|
35
|
-
});
|
|
36
|
-
console.log('✨ Built config.css');
|
|
37
|
-
await outputCss({
|
|
38
|
-
inputPath: inputFile.desktop,
|
|
39
|
-
outputPath: path.join(PLUGIN_CONTENTS_DIRECTORY, 'desktop.css'),
|
|
40
|
-
config: tailwindConfig.desktop,
|
|
41
|
-
minify: true,
|
|
42
|
-
});
|
|
43
|
-
console.log('✨ Built desktop.css');
|
|
44
|
-
}
|
|
45
|
-
const entryPoints = ['desktop', 'config'].map((dir) => ({
|
|
46
|
-
in: path.join('src', dir, 'index.ts'),
|
|
47
|
-
out: dir,
|
|
48
|
-
}));
|
|
49
|
-
await buildWithEsbuild({
|
|
50
|
-
entryPoints,
|
|
51
|
-
outdir: PLUGIN_CONTENTS_DIRECTORY,
|
|
52
|
-
minify: true,
|
|
53
|
-
sourcemap: false,
|
|
54
|
-
legalComments: 'none',
|
|
55
|
-
});
|
|
56
|
-
console.log('✨ Built desktop.js and config.js');
|
|
57
|
-
console.log('✨ Build success.');
|
|
58
|
-
}
|
|
59
|
-
catch (error) {
|
|
60
|
-
throw error;
|
|
61
|
-
}
|
|
62
|
-
finally {
|
|
63
|
-
console.groupEnd();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
//#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,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,KAAK,CAAC;IACd,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,QAAQ,EAAE,CAAC;IACrB,CAAC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-genkey.d.ts","sourceRoot":"","sources":["../../src/commands/plugin-genkey.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,OAAO,SAK9B;AAED,wBAAsB,MAAM,kBAE3B"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { program } from 'commander';
|
|
2
|
-
import base from './genkey-base.js';
|
|
3
|
-
import { PLUGIN_WORKSPACE_DIRECTORY } from '../lib/constants.js';
|
|
4
|
-
export default function command() {
|
|
5
|
-
program
|
|
6
|
-
.command('genkey')
|
|
7
|
-
.description('Generate SSL key for localhost. (Require mkcert)')
|
|
8
|
-
.action(action);
|
|
9
|
-
}
|
|
10
|
-
export async function action() {
|
|
11
|
-
await base({ output: PLUGIN_WORKSPACE_DIRECTORY });
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=plugin-genkey.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-genkey.js","sourceRoot":"","sources":["../../src/commands/plugin-genkey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,CAAC,OAAO,UAAU,OAAO;IAC7B,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,kDAAkD,CAAC;SAC/D,MAAM,CAAC,MAAM,CAAC,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,MAAM,IAAI,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-init.d.ts","sourceRoot":"","sources":["../../src/commands/plugin-init.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,UAAU,OAAO,SAE9B;AAED,wBAAsB,MAAM,kBAkC3B"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { program } from 'commander';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import packer from '@kintone/plugin-packer';
|
|
5
|
-
import { outputManifest } from '../lib/plugin-manifest.js';
|
|
6
|
-
import { PLUGIN_WORKSPACE_DIRECTORY } from '../lib/constants.js';
|
|
7
|
-
import { getContentsZipBuffer, outputContentsZip } from '../lib/zip.js';
|
|
8
|
-
import { copyPluginContents } from '../lib/plugin-contents.js';
|
|
9
|
-
export default function command() {
|
|
10
|
-
program.command('init').description('generate private.ppk and kitting config').action(action);
|
|
11
|
-
}
|
|
12
|
-
export async function action() {
|
|
13
|
-
console.group('🍳 Executing plugin initialization setup');
|
|
14
|
-
try {
|
|
15
|
-
const manifest = await outputManifest('dev');
|
|
16
|
-
console.log('📝 manifest.json generated');
|
|
17
|
-
await copyPluginContents();
|
|
18
|
-
console.log('📁 contents copied');
|
|
19
|
-
let privateKey;
|
|
20
|
-
const keyPath = path.join(PLUGIN_WORKSPACE_DIRECTORY, 'private.ppk');
|
|
21
|
-
if (fs.existsSync(keyPath)) {
|
|
22
|
-
privateKey = await fs.readFile(keyPath, 'utf8');
|
|
23
|
-
}
|
|
24
|
-
await outputContentsZip(manifest);
|
|
25
|
-
const buffer = await getContentsZipBuffer();
|
|
26
|
-
const output = await packer(buffer, privateKey);
|
|
27
|
-
if (!privateKey) {
|
|
28
|
-
await fs.writeFile(path.join(PLUGIN_WORKSPACE_DIRECTORY, 'private.ppk'), output.privateKey);
|
|
29
|
-
console.log('🔑 private.ppk generated');
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
console.log('🔑 private.ppk already exists. The existing private.ppk will be used.');
|
|
33
|
-
}
|
|
34
|
-
await fs.writeFile(path.join(PLUGIN_WORKSPACE_DIRECTORY, 'plugin.zip'), output.plugin);
|
|
35
|
-
console.log('📦 plugin.zip generated');
|
|
36
|
-
console.log('✨ Plugin initialization setup completed! zip file path is ./.plugin/plugin.zip');
|
|
37
|
-
}
|
|
38
|
-
catch (error) {
|
|
39
|
-
throw error;
|
|
40
|
-
}
|
|
41
|
-
finally {
|
|
42
|
-
console.groupEnd();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=plugin-init.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-init.js","sourceRoot":"","sources":["../../src/commands/plugin-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,CAAC,OAAO,UAAU,OAAO;IAC7B,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,yCAAyC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAChG,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC1D,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,cAA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AC;IACrB,CAAC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-tsup.d.ts","sourceRoot":"","sources":["../../src/commands/plugin-tsup.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,OAAO,SAK9B;AAED,wBAAsB,MAAM,kBA0D3B"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { program } from 'commander';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { PLUGIN_CONTENTS_DIRECTORY } from '../lib/constants.js';
|
|
5
|
-
import { importK2PluginConfig } from '../lib/import.js';
|
|
6
|
-
import { lint } from '../lib/lint.js';
|
|
7
|
-
import { getTailwindConfig, getTailwindInputCss, outputCss } from '../lib/tailwind.js';
|
|
8
|
-
import { buildWithTsup } from '../lib/tsup.js';
|
|
9
|
-
export default function command() {
|
|
10
|
-
program
|
|
11
|
-
.command('tsup')
|
|
12
|
-
.description("Build the project for production. (It's a wrapper of webpack build command.)")
|
|
13
|
-
.action(action);
|
|
14
|
-
}
|
|
15
|
-
export async function action() {
|
|
16
|
-
console.group('🍳 Build the project for production');
|
|
17
|
-
try {
|
|
18
|
-
const config = await importK2PluginConfig();
|
|
19
|
-
if (config?.lint?.build) {
|
|
20
|
-
await lint();
|
|
21
|
-
console.log('✨ Lint success.');
|
|
22
|
-
}
|
|
23
|
-
if (!fs.existsSync(PLUGIN_CONTENTS_DIRECTORY)) {
|
|
24
|
-
await fs.mkdir(PLUGIN_CONTENTS_DIRECTORY, { recursive: true });
|
|
25
|
-
}
|
|
26
|
-
if (config.tailwind?.css && config.tailwind?.config) {
|
|
27
|
-
const tailwindConfig = await getTailwindConfig(config.tailwind);
|
|
28
|
-
const inputFile = getTailwindInputCss(config.tailwind);
|
|
29
|
-
await outputCss({
|
|
30
|
-
inputPath: inputFile.config,
|
|
31
|
-
outputPath: path.join(PLUGIN_CONTENTS_DIRECTORY, 'config.css'),
|
|
32
|
-
config: tailwindConfig.config,
|
|
33
|
-
minify: true,
|
|
34
|
-
});
|
|
35
|
-
console.log('✨ Built config.css');
|
|
36
|
-
await outputCss({
|
|
37
|
-
inputPath: inputFile.desktop,
|
|
38
|
-
outputPath: path.join(PLUGIN_CONTENTS_DIRECTORY, 'desktop.css'),
|
|
39
|
-
config: tailwindConfig.desktop,
|
|
40
|
-
minify: true,
|
|
41
|
-
});
|
|
42
|
-
console.log('✨ Built desktop.css');
|
|
43
|
-
}
|
|
44
|
-
const entryPoints = ['desktop', 'config'].reduce((acc, dir) => ({
|
|
45
|
-
...acc,
|
|
46
|
-
[dir]: path.join('src', dir, 'index.ts'),
|
|
47
|
-
}), {});
|
|
48
|
-
await buildWithTsup({
|
|
49
|
-
entryPoints,
|
|
50
|
-
outDir: PLUGIN_CONTENTS_DIRECTORY,
|
|
51
|
-
minify: true,
|
|
52
|
-
treeshake: true,
|
|
53
|
-
sourcemap: false,
|
|
54
|
-
});
|
|
55
|
-
console.log('✨ Built desktop.js and config.js');
|
|
56
|
-
console.log('✨ Build success.');
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
throw error;
|
|
60
|
-
}
|
|
61
|
-
finally {
|
|
62
|
-
console.groupEnd();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=plugin-tsup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-tsup.js","sourceRoot":"","sources":["../../src/commands/plugin-tsup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAA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AAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;YAClC,MAAM,SAAS,CAAC;gBACd,SAAS,EAAE,SAAS,CAAC,OAAO;gBAC5B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,aAAa,CAAC;gBAC/D,MAAM,EAAE,cAAc,CAAC,OAAO;gBAC9B,MAAM,EAAE,IAAI;aACb,CAAC,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QACrC,CAAC;QAED,MAAM,WAAW,GAAqB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,MAAM,CAChE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;YACb,GAAG,GAAG;YACN,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,CAAC;SACzC,CAAC,EACF,EAAE,CACH,CAAC;QAEF,MAAM,aAAa,CAAC;YAClB,WAAW;YACX,MAAM,EAAE,yBAAyB;YACjC,MAAM,EAAE,IAAI;YACZ,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,KAAK;SACjB,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,KAAK,CAAC;IACd,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,QAAQ,EAAE,CAAC;IACrB,CAAC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-zip.d.ts","sourceRoot":"","sources":["../../src/commands/plugin-zip.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,OAAO,IAAI,IAAI,CAWtC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { program } from 'commander';
|
|
2
|
-
import { outputManifest } from '../lib/plugin-manifest.js';
|
|
3
|
-
import fs from 'fs-extra';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import { PLUGIN_WORKSPACE_DIRECTORY } from '../lib/constants.js';
|
|
6
|
-
import packer from '@kintone/plugin-packer';
|
|
7
|
-
import { getContentsZipBuffer, getZipFileNameSuffix, outputContentsZip } from '../lib/zip.js';
|
|
8
|
-
import { copyPluginContents } from '../lib/plugin-contents.js';
|
|
9
|
-
import { isEnv } from '../lib/utils.js';
|
|
10
|
-
export default function command() {
|
|
11
|
-
program
|
|
12
|
-
.command('zip')
|
|
13
|
-
.description('generate plugin zip')
|
|
14
|
-
.option('-e, --env <env>', 'plugin environment (dev, prod, standalone)', 'prod')
|
|
15
|
-
.option('-p, --ppk <ppk>', '.ppk file path', path.join(PLUGIN_WORKSPACE_DIRECTORY, 'private.ppk'))
|
|
16
|
-
.action(action);
|
|
17
|
-
}
|
|
18
|
-
async function action(options) {
|
|
19
|
-
console.group('🍳 Executing plugin zip generation');
|
|
20
|
-
try {
|
|
21
|
-
const { env, ppk: ppkPath } = options;
|
|
22
|
-
if (!isEnv(env)) {
|
|
23
|
-
throw new Error('Invalid environment');
|
|
24
|
-
}
|
|
25
|
-
await copyPluginContents();
|
|
26
|
-
console.log('📁 contents copied');
|
|
27
|
-
const manifest = await outputManifest(env);
|
|
28
|
-
console.log(`📝 manifest.json generated (${env})`);
|
|
29
|
-
await outputContentsZip(manifest);
|
|
30
|
-
console.log('📦 contents.zip generated');
|
|
31
|
-
const buffer = await getContentsZipBuffer();
|
|
32
|
-
const privateKey = await fs.readFile(path.resolve(ppkPath), 'utf8');
|
|
33
|
-
const output = await packer(buffer, privateKey);
|
|
34
|
-
const zipFileName = `plugin${getZipFileNameSuffix(env)}.zip`;
|
|
35
|
-
await fs.writeFile(path.join(PLUGIN_WORKSPACE_DIRECTORY, zipFileName), output.plugin);
|
|
36
|
-
console.log('📦 plugin.zip generated');
|
|
37
|
-
console.log(`✨ Plugin zip generation completed! zip file path is ./.plugin/${zipFileName}`);
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
throw error;
|
|
41
|
-
}
|
|
42
|
-
finally {
|
|
43
|
-
console.groupEnd();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=plugin-zip.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-zip.js","sourceRoot":"","sources":["../../src/commands/plugin-zip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,CAAC,OAAO,UAAU,OAAO;IAC7B,OAAO;SACJ,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,qBAAqB,CAAC;SAClC,MAAM,CAAC,iBAAiB,EAAE,4CAA4C,EAAE,MAAM,CAAC;SAC/E,MAAM,CACL,iBAAiB,EACjB,gBAAgB,EAChB,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,aAAa,CAAC,CACrD;SACA,MAAM,CAAC,MAAM,CAAC,CAAC;AACpB,CAAC;AAED,KAAK,UAAU,MAAM,CAAC,OAAqC;IACzD,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACpD,IAAI,CAAC;QACH,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,OAAO,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AAIA,MAAM,CAAC,OAAO,UAAU,OAAO,SAE9B;AAED,wBAAsB,MAAM,kBAU3B"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { program } from 'commander';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
import { esmImport } from '../../lib/import.js';
|
|
4
|
-
export default function command() {
|
|
5
|
-
program.command('test').description('test').action(action);
|
|
6
|
-
}
|
|
7
|
-
export async function action() {
|
|
8
|
-
console.group('package.json');
|
|
9
|
-
const packageJson = fs.readJSONSync('package.json');
|
|
10
|
-
console.log('package.json detected');
|
|
11
|
-
console.groupEnd();
|
|
12
|
-
console.group('Config');
|
|
13
|
-
const config = await esmImport('plugin.config.mjs');
|
|
14
|
-
console.log('plugin.config.mjs detected', config);
|
|
15
|
-
console.groupEnd();
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/test/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,CAAC,OAAO,UAAU,OAAO;IAC7B,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9B,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;IACpD,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IACrC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAEnB,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACxB,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,mBAAmB,CAAC,CAAC;IACpD,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAAC;IAClD,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrB,CAAC"}
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { program } from 'commander';
|
|
3
|
-
import build from './commands/build.js';
|
|
4
|
-
import dev from './commands/dev/index.js';
|
|
5
|
-
import genkey from './commands/genkey.js';
|
|
6
|
-
import esbuildBuild from './commands/build-esbuild.js';
|
|
7
|
-
import lint from './commands/lint.js';
|
|
8
|
-
program.name('k2').version('1.10.0').description('k2 - 🍳 kintone kitchen 🍳');
|
|
9
|
-
build();
|
|
10
|
-
esbuildBuild();
|
|
11
|
-
dev();
|
|
12
|
-
genkey();
|
|
13
|
-
lint();
|
|
14
|
-
program.parse(process.argv);
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,GAAG,MAAM,yBAAyB,CAAC;AAC1C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;AAE/E,KAAK,EAAE,CAAC;AACR,YAAY,EAAE,CAAC;AACf,GAAG,EAAE,CAAC;AACN,MAAM,EAAE,CAAC;AACT,IAAI,EAAE,CAAC;AAEP,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/dist/lib/cert.d.ts
DELETED
package/dist/lib/cert.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cert.d.ts","sourceRoot":"","sources":["../../src/lib/cert.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,GAAU,QAAQ,MAAM;;EAWhD,CAAC"}
|