{"id":15012599,"url":"https://github.com/microsoft/powerplatform-cli-wrapper","last_synced_at":"2025-10-19T14:30:48.099Z","repository":{"id":248145356,"uuid":"346760925","full_name":"microsoft/powerplatform-cli-wrapper","owner":"microsoft","description":"Power Platform CLI Wrapper","archived":false,"fork":false,"pushed_at":"2024-11-25T07:02:56.000Z","size":1755,"stargazers_count":8,"open_issues_count":9,"forks_count":4,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-01-30T10:51:11.154Z","etag":null,"topics":["dataverse","paccli","powerplatform"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-11T16:10:28.000Z","updated_at":"2024-11-25T06:35:27.000Z","dependencies_parsed_at":"2024-07-12T18:02:29.913Z","dependency_job_id":"f7667ac7-f5da-4e9a-9c33-883d1a29ebc1","html_url":"https://github.com/microsoft/powerplatform-cli-wrapper","commit_stats":{"total_commits":366,"total_committers":20,"mean_commits":18.3,"dds":0.7021857923497268,"last_synced_commit":"e0a1720e2478cd6c51e0cae4920af42f97e86937"},"previous_names":["microsoft/powerplatform-cli-wrapper"],"tags_count":236,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fpowerplatform-cli-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fpowerplatform-cli-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fpowerplatform-cli-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fpowerplatform-cli-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/powerplatform-cli-wrapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237143606,"owners_count":19262237,"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":["dataverse","paccli","powerplatform"],"created_at":"2024-09-24T19:42:53.952Z","updated_at":"2025-10-19T14:30:47.642Z","avatar_url":"https://github.com/microsoft.png","language":"TypeScript","readme":"# Power Platform CLI Wrapper\n\nThis repo contains the intermediate layer between [Power Platform Build Tools](https://github.com/microsoft/powerplatform-build-tools), [GitHub Actions](https://github.com/microsoft/powerplatform-actions) and [PAC CLI](https://aka.ms/PowerPlatformCLI).\n\nCli-Wrapper by itself doesn't call a specific version of PAC CLI, it lets the individual hosts decide which version of PAC CLI to be used.\nAlthough, it is recommended that all hosts use the latest version of PAC CLI.\nWhenever a newer version of PAC CLI is released, each host needs to update it and make new releases.\nPlease check the design for better understanding - ![Architecture](/images/Architecture.PNG)\n\n## Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft \ntrademarks or logos is subject to and must follow \n[Microsoft's Trademark \u0026 Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n\n## Setting Up Dev Environment\n\nWindows, macOS or Linux:\n\n- [Node.js (LTS)](https://nodejs.org/en/download/)\n- gulp CLI: ```npm install -g gulp-cli```\n- [git](https://git-scm.com/downloads)\n- [VS Code](https://code.visualstudio.com/Download) or your different favorite editor\n- recommended VSCode extensions:\n  - [EditorConfig for VS Code (editorconfig.editorconfig)](https://github.com/editorconfig/editorconfig-vscode)\n  - [ESLint (dbaeumer.vscode-eslint)](https://github.com/Microsoft/vscode-eslint)\n  - [GitLens (eamodio.gitlens)](https://github.com/eamodio/vscode-gitlens)\n  - [markdownlint (davidanson.vscode-markdownlint)](https://github.com/DavidAnson/vscode-markdownlint)\n  - [Mocha sidebar (maty.vscode-mocha-sidebar)](https://github.com/maty21/mocha-sidebar)\n\nIf developing on Linux or macOS, you will also need to install `git-lfs`.  (It is prepackaged with the Git installer for Windows.)  Follow the [instructions here](https://docs.github.com/en/github/managing-large-files/installing-git-large-file-storage) for your environment.\n\n## Getting Started\n\nClone, restore modules, build and run:\n\n```bash\ngit clone https://github.com/microsoft/powerplatform-cli-wrapper.git\ncd powerplatform-cli-wrapper\nnpm install\nnpm install -g gulp-cli\ngulp ci\n```\n\n### How to make GitHub Actions and Build Tools compatible with latest PAC CLI?\n\nAfter adding any new functionality in PAC CLI, support for relevant parameters/actions needs to be considered on all three repositories.\nThis will ensure that our CI/CD pipelines are in sync with PAC CLI.\n\nLet's say backup environment supports a new action 'foo' then update:\n\n```bash\nexport interface BackupEnvironmentParameters {\n  credentials: AuthCredentials;\n  environment?: HostParameterEntry;\n  environmentUrl?: HostParameterEntry;\n  environmentId?: HostParameterEntry;\n  backupLabel: HostParameterEntry;\n  notes: HostParameterEntry;\n  foo: HostParameterEntry;\n}\n```\n\nand also update it in main method\n\n```bash\nconst pacArgs = [\"admin\", \"backup\"];\nconst validator = new InputValidator(host);\n\nvalidator.pushInput(pacArgs, \"--environment\", parameters.environment);\nvalidator.pushInput(pacArgs, \"--url\", parameters.environmentUrl);\nvalidator.pushInput(pacArgs, \"--environment-id\", parameters.environmentId);\nvalidator.pushInput(pacArgs, \"--label\", parameters.backupLabel);\nvalidator.pushInput(pacArgs, \"--notes\", parameters.notes);\nvalidator.pushInput(pacArgs, \"--foo\", parameters.foo);\n```\n\nNow update the unit test accordingly (mock the input by using test/actions/mock/mockHost.ts)\n\nOnce a new parameter/action in cli-wrapper is added and merged to main,\nthen run `npm run trigger-pkg-release` which will generate a new version (say 0.1.45) of the cli-wrapper npm package,\npublishes the npm package to this repo's package feed.\nThe new version of that `@microsoft/powerplatform-cli-wrapper` package can then be consumed in both PP-BT and GitHub Actions repos.\n\nSimilar changes need to be done in both Build Tools and GitHub Actions to consume the new parameter 'foo'.\n\nLet's take pp-actions, Go to package.json and update cli-wrapper version (as a pinned version, don't use `^0.1.45` to avoid breaks):\n\n```bash\n\"@microsoft/powerplatform-cli-wrapper\": \"0.1.45\"\n```\n\nRun 'npm install'.\n\nNow go to 'src/actions/backup-environment/index.ts' and add foo parameter:\n\n```bash\nawait backupEnvironment({\n    credentials: getCredentials(),\n    environment: parameterMap['environment'],\n    environmentUrl: parameterMap['environment-url'],\n    backupLabel: parameterMap['backup-label'],\n    notes: parameterMap['notes'],\n    foo: parameterMap['foo'],\n}, runnerParameters, new ActionsHost());\n```\n\nAlso go to 'backup-environment/action.yml' and add a new entry:\n\n```bash\nfoo:\n  description: 'Dummy foo action.'\n  required: false\n```\n\nNow update the unit test test/bacupEnvironment.test.ts.\n\nDo similar changes also in Build Tools in the specified files -\u003e src/tasks/backup-environment/backup-environment-v0/index.ts, src/tasks/backup-environment/backup-environment-v0/task.json and test/actions/backup-environment.test.ts and nuget.json (line 18, 23).\n\nIn pp-actions, After creating a PR with changes in your commit, please update dist folder in a separate commit by running “npm run update-dist” in \"./\u003cpp-actions\u003e/\"\n\nRun gulp ci in both pp-action or pp-build-tools before creating a pull request.\n\nNote:\n\n1) If you are getting an E401 error then it is likely that your PAT in GitHub expired, if it didn't then try to login again by running 'npm login --scope=@microsoft --registry=https://npm.pkg.github.com' and provide the PAT as password.\n\n2) For Testing before releasing a package on local machine: you can run 'gulp ci' in cli-wrapper after making changes and copy the generated dist folder into \".\\\u003cpp-build-tools (or) pp-actions\u003e\\node_modules\\@microsoft\\powerplatform-cli-wrapper\"\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fpowerplatform-cli-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fpowerplatform-cli-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fpowerplatform-cli-wrapper/lists"}