UNPKG

gatsby-source-wordpress

Version:

Source data from WordPress in an efficient and scalable way.

23 lines (21 loc) 908 B
"use strict"; exports.__esModule = true; exports.restoreAuthPluginOptions = exports.hideAuthPluginOptions = void 0; let storedAuthSettings; const hideAuthPluginOptions = async (_helpers, pluginOptions) => { // store auth settings so we can restore them later storedAuthSettings = pluginOptions.auth; // remove auth from pluginOptions before we write out browser plugin options module, // so we don't leak into the browser delete pluginOptions.auth; }; exports.hideAuthPluginOptions = hideAuthPluginOptions; const restoreAuthPluginOptions = async (_helpers, pluginOptions) => { if (storedAuthSettings) { // if we stored auth settings, restore them now after we've written out browser plugin options module // so engines can use them pluginOptions.auth = storedAuthSettings; } }; exports.restoreAuthPluginOptions = restoreAuthPluginOptions; //# sourceMappingURL=auth-handling.js.map