{"id":13750423,"url":"https://github.com/estruyf/node-sppkg-deploy","last_synced_at":"2025-05-09T15:32:01.484Z","repository":{"id":65424762,"uuid":"100010831","full_name":"estruyf/node-sppkg-deploy","owner":"estruyf","description":"SharePoint APP Package Deployment","archived":true,"fork":false,"pushed_at":"2019-02-13T08:20:30.000Z","size":141,"stargazers_count":4,"open_issues_count":2,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T22:19:28.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"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/estruyf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-08-11T08:35:54.000Z","updated_at":"2024-07-23T19:09:07.000Z","dependencies_parsed_at":"2023-01-23T10:55:23.137Z","dependency_job_id":null,"html_url":"https://github.com/estruyf/node-sppkg-deploy","commit_stats":{"total_commits":20,"total_committers":3,"mean_commits":6.666666666666667,"dds":0.4,"last_synced_commit":"c9554d3ef7f9c108e26978541919b1dc5288cf52"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estruyf%2Fnode-sppkg-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estruyf%2Fnode-sppkg-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estruyf%2Fnode-sppkg-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estruyf%2Fnode-sppkg-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/estruyf","download_url":"https://codeload.github.com/estruyf/node-sppkg-deploy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253275619,"owners_count":21882340,"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-08-03T08:00:35.390Z","updated_at":"2025-05-09T15:32:01.177Z","avatar_url":"https://github.com/estruyf.png","language":"TypeScript","funding_links":[],"categories":["Tools"],"sub_categories":["Samples"],"readme":"# SharePoint APP Package Deployment\n\n[![NPM](https://nodei.co/npm/node-sppkg-deploy.png?compact=true)](https://nodei.co/npm/node-sppkg-deploy/)\n\nThis is a project created for automating the deployment process of SharePoint application packages in the App Catalog site.\n\n## Installation\nRun the following command to install the `node-sppkg-deploy`:\n\n```\n$ npm install node-sppkg-deploy --save-exact\n```\n\n## Usage\n\nOnce you installed this dependency, you can make use of it with the following provided sample code:\n\n```javascript\nconst sppkgDeploy = require('node-sppkg-deploy');\n\nsppkgDeploy.deploy({\n    username: \"username\", // The user that will deploy the file\n    password: \"password\", // The password of the user\n    tenant: \"tenant\", // The tenant name. Example: contoso\n    site: \"sites/catalog\", // Path to your app catalog site\n    filename: \"app.sppkg\", // Filename of the package\n    skipFeatureDeployment: true, // Do you want to skip the feature deployment (SharePoint Framework)\n    verbose: true // Do you want to show logging during the deployment\n});\n\n// OR\n\nsppkgDeploy.deploy({\n    username: \"username\", // The user that will deploy the file\n    password: \"password\", // The password of the user\n    tenant: \"tenant\", // The tenant name. Example: contoso\n    absoluteUrl: \"https://tenant.sharepoint.com/sites/catalog\", // Absolute path to the app catalog site\n    skipFeatureDeployment: true, // Do you want to skip the feature deployment (SharePoint Framework)\n    verbose: true // Do you want to show logging during the deployment\n});\n\n// OR\n\nsppkgDeploy.deploy({\n    username: \"username\", // The user that will deploy the file\n    password: \"password\", // The password of the user\n    absoluteUrl: \"https://sharepoint.contoso.com/sites/catalog\", // Absolute path to the app catalog site\n    sp2016: true // SharePoint 2016 On-Prem\n    verbose: true // Do you want to show logging during the deployment\n});\n```\n\n## Arguments / options\n\nThe following arguments / options can be passed for deploying the package.\n\n### username (required)\n\nType: `String`\nDefault: `\"\"`\n\nSets the username to be used for the deployment.\n\n### password (required)\n\nType: `String`\nDefault: `\"\"`\n\nSets the password to be used for the deployment.\n\n### tenant (optional)\n\nType: `String`\nDefault: `\"\"`\n\nSets the tenant name to be used for the deployment. Example: https://`\u003ctenant\u003e`.sharepoint.com\n\n\u003e Important: You have to specify this property or the **absoluteUrl** property\n\n### site (optional)\n\nType: `String`\nDefault: `\"\"`\n\nSpecify the relative path to the app catalog site. Example: \"sites/catalog\"\n\n\u003e Important: You have to specify this property or the **absoluteUrl** property\n\n### absoluteUrl (optional)\n\nType: `String`\nDefault: `\"\"`\n\nSets the absoluteUrl to the app catalog site that needs to be used for the deployment. Example: `https://tenant.sharepoint.com/sites/catalog`.\n\n\u003e Important: You have to specify this property or the combination **tenant** and **site** property.\n\n### filename (required)\n\nType: `String`\nDefault: `\"\"`\n\nThe name of the package that needs to be deployed.\n\n### skipFeatureDeployment (optional)\n\nType: `Boolean`\nDefault: `true`\n\nSpecify if you want to skip feature deployment. When set to true, your customizations will be tenant-scoped.\n\n\u003e More information about the **skipFeatureDeployment** option can be found here: [Tenant-Scoped solution deployment for SharePoint Framework solutions](https://dev.office.com/sharepoint/docs/spfx/tenant-scoped-deployment).\n\n### sp2016 (optional)\n\nType: `Boolean`\nDefault: `false`\n\nSpecify if this is SP2016 on-prem.\n\n### verbose (optional)\n\nType: `Boolean`\nDefault: `false`\n\nSpecify if you want to show the console logs.\n\n## Where can this be used?\n\nThis dependency can for example be used in your SharePoint Framework release process. Here is a sample gulp task that you can add to your SPFx project:\n\n```javascript\nconst sppkgDeploy = require('node-sppkg-deploy');\n\nconst environmentInfo = {\n  \"username\": \"\",\n  \"password\": \"\",\n  \"tenant\": \"\",\n  \"catalogSite\": \"\"\n}\n\nbuild.task('sppkg-deploy', {\n  execute: (config) =\u003e {\n    environmentInfo.username = config.args['username'] || environmentInfo.username;\n    environmentInfo.password = config.args['password'] || environmentInfo.password;\n    environmentInfo.tenant = config.args['tenant'] || environmentInfo.tenant;\n    environmentInfo.catalogSite = config.args['catalogsite'] || environmentInfo.catalogSite;\n\n    const pkgFile = require('./config/package-solution.json');\n    if (pkgFile) {\n      // Retrieve the filename from the package solution config file\n      let filename = pkgFile.paths.zippedPackage;\n      // Remove the solution path from the filename\n      filename = filename.split('/').pop();\n      // Retrieve the skip feature deployment setting from the package solution config file\n      const skipFeatureDeployment = pkgFile.solution.skipFeatureDeployment ? pkgFile.solution.skipFeatureDeployment : false;\n      // Deploy the SharePoint package\n      return sppkgDeploy.deploy({\n        username: environmentInfo.username,\n        password: environmentInfo.password,\n        tenant: environmentInfo.tenant,\n        site: environmentInfo.catalogSite,\n        filename: filename,\n        skipFeatureDeployment: skipFeatureDeployment,\n        verbose: true\n      });\n    }\n  }\n});\n```\n\nOnce this task is in place, you can run it with: `gulp sppkg-deploy` or `gulp sppkg-deploy --username \"\" --password \"\" --tenant \"\" --catalogsite \"\"`.\n\n\u003e More information about using arguments in SPFx gulp tasks can be found here: [Passing arguments with custom Gulp tasks for SharePoint Framework projects](https://www.eliostruyf.com/passing-arguments-with-custom-gulp-tasks-for-sharepoint-framework-projects/).\n\nOutput of the task:\n\n![Gulp task output](./assets/task-output.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festruyf%2Fnode-sppkg-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Festruyf%2Fnode-sppkg-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festruyf%2Fnode-sppkg-deploy/lists"}