New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hsdk

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hsdk - npm Package Compare versions

Comparing version 7.0.0 to 8.0.0

6

package.json
{
"name": "hsdk",
"version": "7.0.0",
"version": "8.0.0",
"description": "A hypermedia standard development kit for knowing about home api endpoints",

@@ -54,3 +54,3 @@ "main": "transpiled/source/index.js",

"@unction/hammer": "1.0.0",
"@unction/ispopulated": "1.0.0",
"@unction/ispopulated": "2.0.0",
"@unction/ispresent": "1.0.0",

@@ -61,3 +61,3 @@ "@unction/istype": "1.0.0",

"@unction/treeify": "1.0.8",
"abstraction": "10.1.0",
"abstraction": "10.3.0",
"axios": "0.16.1",

@@ -64,0 +64,0 @@ "httpstatuses": "3.0.0",

@@ -26,3 +26,3 @@ # hsdk

},
}})
})
```

@@ -96,4 +96,3 @@

- mediatype: The preferred mediatype for this endpoint
- allowed (FUTURE): An allowed list of fields
- query (FUTURE): An allowed list of query parameter names
- allowed: A list of paths that tells the client what query or body properties are permissible.

@@ -125,6 +124,6 @@ That response will look like this:

"href": "https://hsdkjs.getsandbox.com/v1/accounts",
"query": {
"filter": true,
"sort": true
},
"allowed": [
["fields"],
["sort"]
],
"mediatype": "application/vnd.api+json"

@@ -146,5 +145,5 @@ },

"href": "https://hsdkjs.getsandbox.com/v1/accounts/{id}",
"query": {
"fields": true
},
"allowed": [
["fields"]
],
"mediatype": "application/vnd.api+json"

@@ -167,7 +166,4 @@ },

"allowed": [
[
"data",
"attributes",
"age"
]
["data", "attributes", "age"],
["data", "attributes", "name"]
],

@@ -174,0 +170,0 @@ "mediatype": "application/vnd.api+json"

@@ -16,3 +16,3 @@ import abstraction from "abstraction"

href: {source: prop("href")},
query: {source: prop("query")},
allowed: {source: prop("allowed")},
mediatype: {source: prop("mediatype")},

@@ -51,6 +51,5 @@ },

},
query: {
isPresent: propSatisfies(isPresent, "query"),
isObject: propSatisfies(isType("Object"), "query"),
isPopulated: propSatisfies(isPopulated, "query"),
allowed: {
isPresent: propSatisfies(isPresent, "allowed"),
isArray: propSatisfies(isType("Array"), "allowed"),
},

@@ -57,0 +56,0 @@ mediatype: {

@@ -19,3 +19,3 @@ /* eslint-disable flowtype/require-parameter-type, flowtype/require-return-type */

href: "https://api.example.com/v1/accounts",
query: {},
allowed: [],
mediatype: "application/vnd.api+json"

@@ -35,3 +35,3 @@ }

href: "https://api.example.com/v1/accounts",
query: {},
allowed: [],
mediatype: "application/vnd.api+json"

@@ -38,0 +38,0 @@ }

@@ -20,3 +20,3 @@ /* eslint-disable flowtype/require-parameter-type, flowtype/require-return-type */

description: "A test",
query: {},
allowed: [],
href: "https://example.com/v1/accounts/{id}",

@@ -23,0 +23,0 @@ mediatype: "application/vnd.api+json",

@@ -18,3 +18,3 @@ /* eslint-disable flowtype/require-parameter-type, flowtype/require-return-type */

description: "test",
query: {},
allowed: [],
href: "https://example.com/v1/accounts/{id}",

@@ -36,3 +36,3 @@ mediatype: "application/vnd.api+json",

type(subject(
"",
{},
mocks,

@@ -46,3 +46,3 @@ ), "Promise")

return subject(
"",
{},
mocks,

@@ -55,3 +55,3 @@ )

return subject(
"",
{},
mocks,

@@ -61,1 +61,6 @@ )

})
test("With a real endpoint", ({type}) => {
return subject({url: "https://hsdkjs.getsandbox.com/v1/resources"})
.then((client) => type(client.accounts.v1.show, "function"))
})

@@ -35,3 +35,3 @@ "use strict";

href: { source: (0, _ramda.prop)("href") },
query: { source: (0, _ramda.prop)("query") },
allowed: { source: (0, _ramda.prop)("allowed") },
mediatype: { source: (0, _ramda.prop)("mediatype") }

@@ -70,6 +70,5 @@ },

},
query: {
isPresent: (0, _ramda.propSatisfies)(_ispresent2.default, "query"),
isObject: (0, _ramda.propSatisfies)((0, _istype2.default)("Object"), "query"),
isPopulated: (0, _ramda.propSatisfies)(_ispopulated2.default, "query")
allowed: {
isPresent: (0, _ramda.propSatisfies)(_ispresent2.default, "allowed"),
isArray: (0, _ramda.propSatisfies)((0, _istype2.default)("Array"), "allowed")
},

@@ -76,0 +75,0 @@ mediatype: {

@@ -26,3 +26,3 @@ "use strict";

href: "https://api.example.com/v1/accounts",
query: {},
allowed: [],
mediatype: "application/vnd.api+json"

@@ -40,3 +40,3 @@ }

href: "https://api.example.com/v1/accounts",
query: {},
allowed: [],
mediatype: "application/vnd.api+json"

@@ -43,0 +43,0 @@ }

@@ -24,3 +24,3 @@ "use strict";

description: "A test",
query: {},
allowed: [],
href: "https://example.com/v1/accounts/{id}",

@@ -27,0 +27,0 @@ mediatype: "application/vnd.api+json"

@@ -23,3 +23,3 @@ "use strict";

description: "test",
query: {},
allowed: [],
href: "https://example.com/v1/accounts/{id}",

@@ -45,3 +45,3 @@ mediatype: "application/vnd.api+json"

type((0, _2.default)("", mocks), "Promise");
type((0, _2.default)({}, mocks), "Promise");

@@ -54,3 +54,3 @@ end();

return (0, _2.default)("", mocks).then(function (client) {
return (0, _2.default)({}, mocks).then(function (client) {
return type(client, "object");

@@ -63,5 +63,13 @@ });

return (0, _2.default)("", mocks).then(function (client) {
return (0, _2.default)({}, mocks).then(function (client) {
return type(client.accounts.v1.show, "function");
});
});
(0, _tap.test)("With a real endpoint", function (_ref5) {
var type = _ref5.type;
return (0, _2.default)({ url: "https://hsdkjs.getsandbox.com/v1/resources" }).then(function (client) {
return type(client.accounts.v1.show, "function");
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc