sanity-plugin-mux-input
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -98,8 +98,17 @@ "use strict"; | ||
var dataset = _client.default.clientConfig.dataset; | ||
var res = yield _client.default.request({ | ||
url: "/addons/mux/signing-keys/".concat(dataset, "/").concat(signingKeyId), | ||
withCredentials: true, | ||
method: 'GET' | ||
}); | ||
return res.status === 200; | ||
try { | ||
var res = yield _client.default.request({ | ||
url: "/addons/mux/signing-keys/".concat(dataset, "/").concat(signingKeyId), | ||
withCredentials: true, | ||
method: 'GET' | ||
}); // | ||
// if this signing key is valid it will return { data: { id: 'xxxx' } } | ||
// | ||
return !!(res.data && res.data.id); | ||
} catch (e) { | ||
console.error('Error fetching signingKeyId', signingKeyId, 'assuming it is not valid'); | ||
return false; | ||
} | ||
}); | ||
@@ -106,0 +115,0 @@ return _haveValidSigningKeys.apply(this, arguments); |
@@ -150,2 +150,3 @@ "use strict"; | ||
signingKeyPrivate = data.private_key; | ||
yield (0, _secrets.saveSecrets)(token, secretKey, enableSignedUrls, signingKeyId, signingKeyPrivate); | ||
} catch (_ref2) { | ||
@@ -152,0 +153,0 @@ var message = _ref2.message; |
{ | ||
"name": "sanity-plugin-mux-input", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "An input component that integrates Sanity Studio with MUX.com video encoding/hosting service.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -61,1 +61,15 @@ # Mux Video Input Sanity Plugin | ||
More information for this feature of the plugin can be found on Mux's [documentation](https://docs.mux.com/docs/headless-cms-sanity#advanced-signed-urls) | ||
# Contributing | ||
Issues are actively monitored and PRs are welcome. When developing this plugin the easiest setup is: | ||
1. Fork this repo. | ||
1. Install the sanity cli and create a sanity project: `npm install -g @sanity/cli && sanity init`. Follow the prompts, starting out with the blog template is a good way to go. | ||
1. `cd` into your project directory, run `npm install && npm start` - your sanity studio should be running on http://localhost:3333. | ||
1. `cd` into the `plugins` director of your project. | ||
1. Fork this repo and clone your fork into the `plugins` directory inside your project `git clone git@github.com:your-fork/sanity-plugin-mux-input.git`. | ||
1. Open `sanity.json`, go to the `plugins` array and add `mux-input`. | ||
1. Re-start the sanity studio server with `npm start`. | ||
1. Edit `schemas/post.js` and add follow the plugin documentation to add a `mux.video` type field. | ||
1. Your studio should reload, and now when you edit the plugin code it should reload the studio, when you're done create a branch, put in a PR and a maintainer will review it. Thank you! |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
288514
2760
75