@arc-core-components/content-source_site-service-v3
Advanced tools
Comparing version 0.2.2-beta.1 to 0.2.3-beta.0
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.default = exports.createContentSource = void 0; | ||
exports["default"] = exports.createContentSource = void 0; | ||
var schemaName = "site-service"; | ||
@@ -13,4 +13,14 @@ var params = { | ||
}; | ||
/** | ||
* @func createContentSource | ||
* @param {String} site - the site to get navigation for | ||
* @return {String} site navigation url endpoint | ||
*/ | ||
var createContentSource = function createContentSource(site) { | ||
/** | ||
* @func resolve | ||
* @param {Object} key - section data | ||
* @return {String} site navigation url | ||
*/ | ||
var resolve = function resolve() { | ||
@@ -34,3 +44,3 @@ var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVua25vd24iXSwibmFtZXMiOlsic2NoZW1hTmFtZSIsInBhcmFtcyIsImhpZXJhcmNoeSIsInNlY3Rpb24iLCJjcmVhdGVDb250ZW50U291cmNlIiwic2l0ZSIsInJlc29sdmUiLCJrZXkiLCJzZXJ2aWNlU2l0ZSIsImVuZHBvaW50Il0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxJQUFNQSxVQUFVLEdBQUcsY0FBbkI7QUFDQSxJQUFNQyxNQUFNLEdBQUc7QUFDYkMsRUFBQUEsU0FBUyxFQUFFLE1BREU7QUFFYkMsRUFBQUEsT0FBTyxFQUFFO0FBRkksQ0FBZjs7QUFJTyxJQUFNQyxtQkFBbUIsR0FBRyxTQUF0QkEsbUJBQXNCLENBQUFDLElBQUksRUFBSTtBQUN6QyxNQUFNQyxPQUFPLEdBQUcsU0FBVkEsT0FBVSxHQUFjO0FBQUEsUUFBYkMsR0FBYSx1RUFBUCxFQUFPO0FBQzVCLFFBQU1DLFdBQVcsR0FBR0QsR0FBRyxDQUFDLFVBQUQsQ0FBSCxJQUFtQkYsSUFBdkM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2ludDtcbiAgfTtcbiAgcmV0dXJuIHtcbiAgICByZXNvbHZlLFxuICAgIHBhcmFtcyxcbiAgICBzY2hlbWFOYW1lLFxuICB9O1xufTtcblxuZXhwb3J0IGRlZmF1bHQgY3JlYXRlQ29udGVudFNvdXJjZShcIkFyYyBTaXRlIElzIE5vdCBEZWZpbmVkXCIpO1xuIl19 |
{ | ||
"name": "@arc-core-components/content-source_site-service-v3", | ||
"version": "0.2.2-beta.1", | ||
"version": "0.2.3-beta.0", | ||
"description": "Content source that hooks into the Site Service portion of the Arc Suite.", | ||
@@ -15,3 +15,3 @@ "homepage": "https://github.com/wapopartners/core-components#readme", | ||
}, | ||
"gitHead": "0d213faaa0515cd4e1a01b78c31cb7ea7e1064e0" | ||
"gitHead": "81a47fc866eca96ac1a20025c5570f4d03d567af" | ||
} |
const schemaName = "site-service"; | ||
const params = { | ||
hierarchy: "text", | ||
section: "text" | ||
section: "text", | ||
}; | ||
export const createContentSource = site => { | ||
/** | ||
* @func createContentSource | ||
* @param {String} site - the site to get navigation for | ||
* @return {String} site navigation url endpoint | ||
*/ | ||
export const createContentSource = (site) => { | ||
/** | ||
* @func resolve | ||
* @param {Object} key - section data | ||
* @return {String} site navigation url | ||
*/ | ||
const resolve = (key = {}) => { | ||
const serviceSite = key["arc-site"] || site; | ||
const endpoint = `/site/v3/navigation/${serviceSite}/?hierarchy=${key.hierarchy || | ||
"default"}`; | ||
const endpoint = `/site/v3/navigation/${serviceSite}/?hierarchy=${key.hierarchy | ||
|| "default"}`; | ||
@@ -17,3 +28,3 @@ return key.section ? `${endpoint}&_id=${key.section}` : endpoint; | ||
params, | ||
schemaName | ||
schemaName, | ||
}; | ||
@@ -20,0 +31,0 @@ }; |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
76
7479
6
1