{"id":22040488,"url":"https://github.com/inventsable/cep-self-signing-panel","last_synced_at":"2025-05-07T22:12:57.132Z","repository":{"id":46553216,"uuid":"193266975","full_name":"Inventsable/CEP-Self-Signing-Panel","owner":"Inventsable","description":"How to create a panel that stages and signs itself with a `npm run sign` command","archived":false,"fork":false,"pushed_at":"2021-10-05T23:06:39.000Z","size":5917,"stargazers_count":6,"open_issues_count":15,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T22:12:50.482Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Inventsable.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-22T18:30:33.000Z","updated_at":"2023-11-08T10:14:16.000Z","dependencies_parsed_at":"2022-09-10T17:10:51.468Z","dependency_job_id":null,"html_url":"https://github.com/Inventsable/CEP-Self-Signing-Panel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inventsable%2FCEP-Self-Signing-Panel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inventsable%2FCEP-Self-Signing-Panel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inventsable%2FCEP-Self-Signing-Panel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inventsable%2FCEP-Self-Signing-Panel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inventsable","download_url":"https://codeload.github.com/Inventsable/CEP-Self-Signing-Panel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252961843,"owners_count":21832198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-30T11:14:31.695Z","updated_at":"2025-05-07T22:12:57.112Z","avatar_url":"https://github.com/Inventsable.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CEP Self-Signing Panel\n\n## This panel can stage, sign and certify itself in a single command:\n\n\u003e ![](https://thumbs.gfycat.com/SomeRequiredBordercollie-size_restricted.gif)\n\n## [\u003e Skip to Usage](#usage)\n\n## Adding this functionality to your own panel (skip to #5 if a template from cep-vue-cli made after 6/23/19)\n\n### 1. Copy and paste the following into your `package.json` under `devDependencies`:\n\n```json\n    \"boxen\": \"^4.1.0\",\n    \"chalk\": \"^2.4.2\",\n    \"core-js\": \"^2.6.5\",\n    \"fs-extra\": \"^8.0.1\",\n    \"inquirer\": \"^6.4.1\",\n    \"make-runnable\": \"^1.3.6\",\n    \"ora\": \"^3.4.0\",\n    \"shelljs\": \"^0.8.3\",\n```\n\n### 2. We create custom tasks by pasting this into the `scripts` section of your `package.json`:\n\n```json\n    \"sign\": \"node ./src/utils/dev/npmCommands.js sign\",\n    \"switch\": \"node ./src/utils/dev/npmCommands.js switch\",\n    \"update\": \"node ./src/utils/dev/npmCommands.js update\",\n    \"register\": \"node ./src/utils/dev/npmCommands.js register\",\n    \"help\": \"node ./src/utils/dev/npmCommands.js help\"\n```\n\nThis creates a command named `sign`, which will be used as `npm run sign`. It uses [make-runnable](https://github.com/super-cache-money/make-runnable) to allow a `node [path-to-file] [name-of-function] [parameters-to-pass]` syntax, so the above `node ./src/utils/dev/npmCommands.js sign` is pointing to a function named `sign()` (with no parameters) inside the `npmCommands.js` file. Same for others like `switch` and `update`!\n\n\u003e You can see the above in action within [this repo's own package.json](https://github.com/Inventsable/CEP-Self-Signing-Panel/blob/master/package.json)\n\n### 3. Copy [the ./src/utils/dev folder from this repo](https://github.com/Inventsable/CEP-Self-Signing-Panel/tree/master/src/utils/dev) to the same path. Path must be exact as it generates config files after first use.\n\n### 4. npm install and verify\n\n```bash\n# Now re-run npm install\nnpm install\n\n# Now try your new tasks! Starting with 'help' will give a full outline:\nnpm run help\n```\n\n### 5. You must have [ZXPSignCmd.exe](https://github.com/Adobe-CEP/CEP-Resources/tree/master/ZXPSignCMD/4.0.7) within the parent folder of your extension\n\nIf you're currently developing a panel whose path is `.../appData/Roaming/Adobe/CEP/extensions/myPanel`, ZXPSignCmd.exe must be in `.../appData/Roaming/Adobe/CEP/extensions`.\n\n## What do they do?\n\n### `npm run help` will:\n\n- Prompt a full list of commands of the panel including the ones below\n\n### `npm run sign` will:\n\n- Duplicate and \"stage\" an extension folder to a temporary location, removing any hidden files or folders to ensure the certificate doesn't silently fail\n- Generate a temporary certificate\n- Sign the duplicate with the certificate\n- Check the validation of the signed duplicate\n- Place the resulting `[name][version].zxp` into `./archive` of your current panel (and create this folder if it doesn't already exist). If `[name][version].zxp` already exists, overwrite it\n- Delete the duplicate directory\n\n### `npm run switch` will:\n\n\u003e 🚩 This command only works if the panel was generated by [cep-vue-cli](https://github.com/Inventsable/generator-cep-vue-cli)\n\n- Report whether the manifest is currently prepped for `PRODUCTION` or `DEVELOPER` context.\n- Prompt the user if they'd like to switch contexts\n- If switching contexts, automatically adjusts `manifest.xml` for you (no need to manually open it and switch every time)\n- Prompt with contextual information about the next steps once the confirmation is made\n\n![](https://thumbs.gfycat.com/FrankDeadAardwolf-size_restricted.gif)\n\n### `npm run update` will:\n\n- Report the current version of the panel\n- Prompt the user to update the MAJOR, MINOR, or MICRO tier\n- Auto-suggest the update as the next sequential number but allow any number to be entered\n- Rewrite the version number within `manifest.xml` and `package.json` with the updated semantic version\n\n![](https://thumbs.gfycat.com/SlimyAssuredAchillestang-size_restricted.gif)\n\n### `npm run register` will:\n\n- Report the current string of text to use for `npm run sign` certification\n- Prompt the user for COUNTRY, STATE/LOCALE, ORGANIZATION, and COMMON NAME\n- Write a new file (or overwrite previous) containing country, locale, organization and user\n\n## Usage\n\nWhen you first have created the template or need to start coding, you need `npm run serve` to launch the dev server and see your code reflect in the panel. If you want to build and sign an extension, then at any time you do so by running:\n\n- `npm run build` - This builds/compiles/gulps everything to the ./dist directory\n- `npm run switch` - This changes your manifest.xml file to point to the newly created ./dist/index.html compiled in the previous step. **Without this step, the ZXP will be pointing to a localhost which doesn't exist**\n- `npm run sign` - This stages, signs, and certifies the panel to create a deliverable ready for any one's use. **Note that if you want the certification info to be correct**, you must run `npm run register` at least once to fill out your own data (otherwise dummy data is used).\n\nTo continue development:\n\n- `npm run switch` - Change the manifest.xml back to the localhost for hot reloading\n- `npm run update` **[OPTIONAL]** - To avoid losing or overwriting previous code, it's a good idea to update the version after every `npm run sign`. This allows us to easily keep track of deliverables and stages, and hand off guaranteed deliverables without mixing them up.\n- `npm run serve` - Restart the development server and continue coding\n\nA one-step or odd number shift (`developer` \u003e `production` or vice versa) requires you restart the host application. A two-step or even number shift (`developer` \u003e `production` \u003e `developer`) requires only that you refresh the panel. This is because `manifest.xml` only reads once at the host app's launch, so switching it's entry point to change between `production` and `developer` will not be detected by the host app.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finventsable%2Fcep-self-signing-panel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finventsable%2Fcep-self-signing-panel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finventsable%2Fcep-self-signing-panel/lists"}