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

vue-contentful-hook

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-contentful-hook - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [1.3.0](https://github.com/lbenie/vue-contentful-hook/compare/v1.2.0...v1.3.0) (2022-03-21)
### :sparkles: Features
* use axios for ssr ([9bb183b](https://github.com/lbenie/vue-contentful-hook/commit/9bb183b9583ff7b1cc1c43fdcb594c0db7210acd))
## [1.2.0](https://github.com/lbenie/vue-contentful-hook/compare/v1.1.0...v1.2.0) (2022-03-18)

@@ -2,0 +9,0 @@

10

dist/vue-contentful-hook.es.js
import { ref } from "vue";
import axios from "axios";
var useContentful = function(query, _a) {

@@ -8,4 +9,3 @@ var spaceId = _a.spaceId, token = _a.token;

var URI = "https://graphql.contentful.com/content/v1/spaces/".concat(spaceId);
var options = {
method: "POST",
axios.post(URI, {
headers: {

@@ -16,6 +16,6 @@ Authorization: "Bearer ".concat(token),

body: JSON.stringify({ query })
};
fetch(URI, options).then(function(response) {
return response.json();
}).then(function(_a2) {
var data2 = _a2.data;
return data2;
}).then(function(_a2) {
var response = _a2.data, contenfulErrors = _a2.errors;

@@ -22,0 +22,0 @@ isLoading.value = false;

@@ -1,1 +0,1 @@

(function(e,n){typeof exports=="object"&&typeof module!="undefined"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(e=typeof globalThis!="undefined"?globalThis:e||self,n(e["vue-contentful-hook"]={},e.vue))})(this,function(e,n){"use strict";var s=function(c,r){var d=r.spaceId,l=r.token,u=n.ref(),o=n.ref(),i=n.ref(!0),p="https://graphql.contentful.com/content/v1/spaces/".concat(d),v={method:"POST",headers:{Authorization:"Bearer ".concat(l),"Content-Type":"application/json"},body:JSON.stringify({query:c})};return fetch(p,v).then(function(t){return t.json()}).then(function(t){var f=t.data,a=t.errors;i.value=!1,f&&(u.value=f),a&&(o.value=a)}).catch(function(t){o.value=[String(t)]}),{data:u,errors:o,isLoading:i}};e.useContentful=s,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"});
(function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue"),require("axios")):typeof define=="function"&&define.amd?define(["exports","vue","axios"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["vue-contentful-hook"]={},e.vue,e.axios))})(this,function(e,t,c){"use strict";function d(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var l=d(c),p=function(n,u){var v=u.spaceId,h=u.token,i=t.ref(),a=t.ref(),f=t.ref(!0),y="https://graphql.contentful.com/content/v1/spaces/".concat(v);return l.default.post(y,{headers:{Authorization:"Bearer ".concat(h),"Content-Type":"application/json"},body:JSON.stringify({query:n})}).then(function(o){var r=o.data;return r}).then(function(o){var r=o.data,s=o.errors;f.value=!1,r&&(i.value=r),s&&(a.value=s)}).catch(function(o){a.value=[String(o)]}),{data:i,errors:a,isLoading:f}};e.useContentful=p,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"});
{
"name": "vue-contentful-hook",
"version": "1.2.0",
"version": "1.3.0",
"description": "A vue hook to fetch contentful data using GraphQL query",

@@ -50,2 +50,3 @@ "repository": {

"all-contributors-cli": "6.20.0",
"axios": "^0.26.1",
"concurrently": "7.0.0",

@@ -70,4 +71,5 @@ "conventional-changelog-conventionalcommits": "4.6.3",

"peerDependencies": {
"axios": "^0.26.1",
"vue": "^3.2.29"
}
}
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