@amazon-devices/kepler-module-manifest-builder
v0.1.13
Published
A helper-tool that will build manifests, for library and application developers.
Readme
KeplerModuleManifestBuilder
Kepler Module Manifest Builder is a standalone NPM package responsible for generating manifests that are used during App Installation to ensure all of the required components are available on the system.
Application and Library developers will also use this package to deliver backward-compatible experiences, which allow developers to build and submit a single App that works for previous and latest Kepler OS.
Installation
To begin, you will want to globally install this package:
npm install -g "@amazon-devices/kepler-module-manifest-builder"Usage
This script should be run after you have built your package or Application. It is expected that your node_modules/ folder exists prior to running this script.
Building a Manifest
In this example, my-project is the directory of your package or Application. It is required that ./my-project/node_modules/ directory exists in order to run this script.
For Basic manifest generation, without overrides:
kmmb build ./my-projectParsing package.json of the application to see if kepler.backwardCompatibility overrides are defined:
kmmb build ./my-project -p ./package.jsonParsing package.json and manifest.toml of the application, to see if kepler.backwardCompatibility overrides are defined and warn if privileges are left undefined:
kmmb build ./my-project -p ./package.json -m ./manifest.tomlQuery Command
App and Library developers who wish to maintain backward compatibility on existing and future Device OS can use the query command:
kepler-module-manifest-builder query []
<libraryName>: The name of the library you want to query.<installedVersion>(optional): The version currently installed in your project (typically found in your package-lock.json).
This command will return a list of backward-compatible versions that can be targeted for backward-compatibility, when installing the given library and version.
Examples:
List all available versions:
kmmb query @amazon-devices/react-native-gesture-handlerUse custom package manager:
kmmb query @amazon-devices/react-native-gesture-handler --pmjs yarnQuery specific version compatibility:
kmmb query @amazon-devices/react-native-gesture-handler -v 2.4.0
# Output:
Backward-compatible versions to when using @amazon-devices/[email protected]:
* 2.0.0
* 2.1.0
* 2.2.0
* 2.3.0
* 2.4.0This means that when you install 2.4.0, you have the ability to target devices whose latest version was 2.0.0, 2.1.0, 2.2.0, or 2.3.0.
Note for Application Developers:
Application developers should carefully read the Release Notes to understand what changed between any of the versions listed by this command.
As necessary, you will need to introduce appropriate "Application Sandbox Checks" to ensure that their program works when eitherbackward-compatible or newest versions of the library are found.
