
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
@sap/html5-app-deployer
Advanced tools
HTML5 application deployer handles the upload of the HTML5 application content to the HTML5 application repository.
@sap/html5-app-deployer module is consumed as a dependency in a node.js CF application.
{
"name": "myAppDeployer",
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"@sap/html5-app-deployer": "1.1.0"
},
"scripts": {
"start": "node node_modules/html5-app-deployer/index.js"
}
}
Below the root folder, the HTML5 application deployer app may contain a folder called "resources",for the static files of the HTML5 application. If static content should be uploaded from another folder than "resources", the path to that folder can be provided as a tag starting with "resources=" while creating an app-host service instance. For example:
cf create-service html5-apps-repo app-host myApp100 -c '{"xs-security":{"xsappname":"myApp100"},"appName":"myApp", "appVersion":"1.0.0"}' -t resources=webapp
If no "resources=" tag provided HTML5 application deployer will try to upload from resources folder, if no resources folder found, it will fail to upload. The sap/html5-app-deployer consumer application should be bound to a single html5-apps-repo service instance of the app-host service plan. When the sap/html5-app-deployer consumer application is started, the @sap/html5-app-deployer module creates a zip archive of the content in the “resources” folder and triggers the upload of the zip archive to the HTML5 application repository.
To deploy an sap/html5-app-deployer consumer application in CF, you can choose one of the following procedures:
applications:
- name: myAppDeployer100
no-route: true
memory: 128M
services:
- myApp100-dt
cf create-service html5-apps-repo app-host myApp100-dt -c '{"xs-security":{"xsappname":"myApp100"},"appName":"myApp", "appVersion":"1.0.0"}' -t resources=webapp
The xsappname should be globally unique because it is the name xsuaa client that is used to create the client_credential token that is used to upload content.
cf push -f manifest.yaml
After sap/html5-app-deployer consumer application has uploaded the content successfully, stop the applicationto to avoid consuming CF container resources.
cf stop myAppDeployer
To use cf deploy the installation of the deploy plugin is required, See deploy plugin documentation In addition, create an *.mtar archive should be created via WebIDE or MTA Build Tool.
The MTA project should have an mtad.yaml file in the following format:
ID: myApp.deployer100 //MTA ID
_schema-version: '2.0'
version: 0.0.3
modules:
- name: myAppDeployer100
type: com.sap.html5.application-content
path: deployer/
requires:
- name: myApp100
resources:
- name: myApp100 //Resource name
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo //Service name
service-plan: app-host //Service plan
service-name: myApp100-dt //Service instance name
service-tags: ["resources=webapp"] //Static content root folder
config:
xs-security:
xsappname: myApp100 //UAA client app name
appName: myApp //Application name
appVersion: 1.0.0 //Application version
Use the WebIDE build or the MTA Build Tool to generate a valid myAppDeployer.mtar file.
cf deploy myAppDeployer.mtar
After deploying the *.mtar file, an application called myAppDeployer (stopped) is shown in cf apps.
When you undeploy the HTML5 application deployer app, the related HTML5 application repository content should be deleted too.
If you have used the cf push command to deploy the app, delete the HTML5 application deployer app manually:
For example:
cf unbind-service myAppDeployer myApp100-dt
For example
cf delete-service myApp100-dt
This step deletes the HTML5 application repository content.
For example
cf delete myAppDeployer
When you undeploy the HTML5 application deployer app, the HTML5 application deployer app is deleted and you can - in the same step - delete the app-host service instance of the html5-apps-repo. To delete the app-host service instance of the html5-apps-repo, the --delete-service parameter should be passed. Note that the undeploy requires the mta id, which can be obtained by calling cf mtas or from the mtad.yaml ID.
For example:
cf undeploy myApp.deployer --delete-services
After making changing to the static content files of the HTML5 application, the new content can be uploaded to HTML5 application repository. You can either create a new version of your HTML5 application or you can delete the existing version and upload the new content using the previous version information.
FAQs
HTML5 application deployer
The npm package @sap/html5-app-deployer receives a total of 12,587 weekly downloads. As such, @sap/html5-app-deployer popularity was classified as popular.
We found that @sap/html5-app-deployer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.