-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
59 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/plugin/packer/from-manifest/__tests__/fixtures/private.ppk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIICWwIBAAKBgQDDH5jleaiQagMnSS6XjrOQCJIDhjutOV7fJyzrsGhIGhFnZk7y | ||
K5YAm+kfOMlCEUZNHavcfS3WrJRP5sanc6E0dobTXNBYVwx97pEZk1KPhPVCiVCC | ||
HBRPvef+Ai98o4aeSVamP6bD9aIZ51+prjcf0uh9+vzzm1XvqF9rgMkhkQIDAQAB | ||
AoGAT8GGmaXUxNLQXyqGpORreSBHrrEbi367zLMSpXQB7BbbrkwfUNWIBs+zxlNL | ||
0HmHJtZN/V4dcnYwWUiXQrL83OHdVgqgcUBKBX5znY9GJcPJoDM6ZhiYR7K79IQq | ||
eAzKCveFm3bhk9+mnOdiZO+q39IPE+3PPz3dQ1PNRwbCh8ECQQDtKstAHmfRcIwf | ||
4woOV+TllxRMDkexThxs/YWV+5Sq3lLUqOjJolLFdW1DwqQHjeyeN008C3IhNLyy | ||
1xeRLLydAkEA0p4gHlCnxUz9nVuRkz2Dk0GMpkdz156Opcf1nKUXar4CbdSp9gbJ | ||
LEBulEDRVop4nY6J4W5hW0bDjuPGnSR0hQJATpU2YVlxxtjG5S3iQBxpcJVdmVHF | ||
+X7LNmXOZILGoNMnmOUatOy/BkRBXwlYNlSVSVtDkRityUjjGVLhsS2klQJAbkQY | ||
3qYtX69SK/sPuP2AkCzGPRu1e1JorkSEwzDvlJPL48JuBP9CfWdyPS2+K0etpBdG | ||
+n32fHoM0hdQGV9HnQJAGed+BG6jxfXJe7KRhPoT3bF4lc4xmdXGfLMoutLqoZ8y | ||
GrKcvq1TcxsA/QSkvSGGEd0667t/9djFq1Ift02RMQ== | ||
-----END RSA PRIVATE KEY----- |
Binary file added
BIN
+865 Bytes
src/plugin/packer/from-manifest/__tests__/fixtures/sample-plugin/image/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions
9
src/plugin/packer/from-manifest/__tests__/fixtures/sample-plugin/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"manifest_version": 1, | ||
"version": 1, | ||
"type": "APP", | ||
"name": { | ||
"en": "sample extension" | ||
}, | ||
"icon": "image/icon.png" | ||
} |
8 changes: 4 additions & 4 deletions
8
...tests__/pack-plugin-from-manifest.test.ts → ...tests__/pack-plugin-from-manifest.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/plugin/packer/from-manifest/pack-plugin-from-manifest.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import path from "path"; | ||
import packer from "../index"; | ||
import { ManifestFactory } from "../manifest"; | ||
import { ContentsZip } from "../contents-zip"; | ||
import type { PluginZip } from "../plugin-zip"; | ||
|
||
// TODO: We can consider deleting this function. Originally, it is used by webpack-plugin-kintone-plugin. | ||
// In cli-kintone, it is no longer needed. | ||
// ref. https://github.com/kintone/js-sdk/blob/fb125766efe1b0866dfb50d56a4aa80c1a8f0de8/packages/webpack-plugin-kintone-plugin/src/plugin.ts#L4 | ||
// ref.https://github.com/kintone-labs/plugin-packer/pull/49 | ||
/** | ||
* @deprecated | ||
*/ | ||
export const packPluginFromManifest = async ( | ||
manifestJSONPath: string, | ||
privateKey: string, | ||
): Promise<{ plugin: PluginZip; privateKey: string; id: string }> => { | ||
const manifest = await ManifestFactory.loadJsonFile(manifestJSONPath); | ||
const contentsZip = await ContentsZip.createFromManifest( | ||
path.dirname(manifestJSONPath), | ||
manifest, | ||
); | ||
return packer(contentsZip, privateKey); | ||
}; |
This file was deleted.
Oops, something went wrong.