@konomi-app/k2 0.4.2 → 0.5.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.
@@ -12,12 +12,13 @@ export default function command() {
12
12
  .command('zip')
13
13
  .description('generate plugin zip')
14
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'))
15
16
  .action(action);
16
17
  }
17
18
  async function action(options) {
18
19
  console.group('🍳 Executing plugin zip generation');
19
20
  try {
20
- const { env } = options;
21
+ const { env, ppk: ppkPath } = options;
21
22
  if (!isEnv(env)) {
22
23
  throw new Error('Invalid environment');
23
24
  }
@@ -27,7 +28,7 @@ async function action(options) {
27
28
  console.log(`📝 manifest.json generated (${env})`);
28
29
  await outputContentsZip(manifest);
29
30
  const buffer = await getContentsZipBuffer();
30
- const privateKey = await fs.readFile(path.join(PLUGIN_WORKSPACE_DIRECTORY, 'private.ppk'), 'utf8');
31
+ const privateKey = await fs.readFile(path.resolve(ppkPath), 'utf8');
31
32
  const output = await packer(buffer, privateKey);
32
33
  const zipFileName = `plugin${getZipFileNameSuffix(env)}.zip`;
33
34
  await fs.writeFile(path.join(PLUGIN_WORKSPACE_DIRECTORY, zipFileName), output.plugin);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konomi-app/k2",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "kintone sdk",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -54,4 +54,4 @@
54
54
  "@types/html-minifier": "^4",
55
55
  "typescript": "*"
56
56
  }
57
- }
57
+ }