Uploads the contents of a file, dist/index.html
by default, to a Cloudflare
Worker's KeyValue store.
Inspired by ember-cli-deploy-redis
ember install ember-cli-deploy-cloudflare-kv
- accountId: Cloudflare account ID.
- email: The email associated with the provided Cloudflare account.
- namespace: A Cloudflare Workers' KV namespace ID.
- apiKey: An API key granting access to the account & namespace.
These configuration options need to be set in config/deploy.js
within ENV['cloudflare-kv']
.
The URL for the Cloudflare API. Defaults to https://api.cloudflare.com/client/v4/accounts
.
Which file from the dist
directory you wish to upload to your namespace. Defaults to index.html
.
Uses minimatch
to allow for multiple files & must include index.html
as a matching file.
The suffix of the activated revision key. Defaults to current
.
The suffix of the content of the activated revision. Defaults to current-content
.
Location of your application's build output. Defaults to context.distDir
.
The list of built project files. This option should be relative to distDir and should include the files that match filePattern. By default, this option will use the distFiles
property of the deployment context, provided by ember-cli-deploy-build.
A message to display after deployment has finished.
The unique revision that will be used to reference the deployment. Defaults to context.commandOptions.revision || context.revisionData.revisionKey
.
Metadata about the revision being uploaded. (normally provided by a plugin like ember-cli-deploy-revision-data)
The prefix used in the KV for each revision. Defaults to context.project.name()
.
For reference on how to configure your worker see the Cloudflare Docs & kv-asset-handler
package.
This project is licensed under the MIT License.