@accounts/graphql-client
Advanced tools
Comparing version 0.2.0-alpha.d383a068 to 0.2.0-alpha.d7d26f67
@@ -1,1 +0,7 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/taggedTemplateLiteral"),require("graphql-tag"),require("babel-runtime/core-js/object/define-property"),require("babel-runtime/core-js/object/keys"),require("babel-runtime/core-js/object/assign"),require("babel-runtime/helpers/asyncToGenerator"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/regenerator")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/taggedTemplateLiteral","graphql-tag","babel-runtime/core-js/object/define-property","babel-runtime/core-js/object/keys","babel-runtime/core-js/object/assign","babel-runtime/helpers/asyncToGenerator","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/createClass","babel-runtime/regenerator"],t):"object"==typeof exports?exports["@accounts/graphql-api"]=t(require("babel-runtime/helpers/taggedTemplateLiteral"),require("graphql-tag"),require("babel-runtime/core-js/object/define-property"),require("babel-runtime/core-js/object/keys"),require("babel-runtime/core-js/object/assign"),require("babel-runtime/helpers/asyncToGenerator"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/regenerator")):e["@accounts/graphql-api"]=t(e["babel-runtime/helpers/taggedTemplateLiteral"],e["graphql-tag"],e["babel-runtime/core-js/object/define-property"],e["babel-runtime/core-js/object/keys"],e["babel-runtime/core-js/object/assign"],e["babel-runtime/helpers/asyncToGenerator"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/createClass"],e["babel-runtime/regenerator"])}(this,function(e,t,n,r,a,u,s,i,o){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(4),u=r(a),s=n(5),i=r(s);Object.defineProperty(t,"__esModule",{value:!0});var o=n(6);(0,i.default)(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return o[e]}})})},function(e,t){e.exports=require("babel-runtime/helpers/taggedTemplateLiteral")},function(e,t){e.exports=require("graphql-tag")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.loginFieldsFragment=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n fragment LoginFields on LoginReturn {\n tokens {\n refreshToken\n accessToken\n }\n }\n "],["\n fragment LoginFields on LoginReturn {\n tokens {\n refreshToken\n accessToken\n }\n }\n "]),i=n(2),o=r(i);t.loginFieldsFragment=(0,o.default)(s)},function(e,t){e.exports=require("babel-runtime/core-js/object/define-property")},function(e,t){e.exports=require("babel-runtime/core-js/object/keys")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClient=void 0;var a=n(22),u=r(a),s=n(19),i=r(s),o=n(1),l=r(o),c=n(18),f=r(c),d=n(20),p=r(d),m=n(21),h=r(m),b=(0,l.default)(["",""],["",""]),g=n(2),v=r(g),k=n(9),_=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,p.default)(this,e),this.options=(0,f.default)({graphQLClient:null,userFieldsFragment:k.defaultUserFieldsFragment},t),this.options.userFieldsFragment=(0,v.default)(b,this.options.userFieldsFragment),!this.options.graphQLClient||!this.options.graphQLClient.query||!this.options.graphQLClient.mutate)throw new Error("Invalid GraphQL client provided: missing 'query' and 'mutate' methods!")}return(0,h.default)(e,[{key:"mutate",value:function(){function e(e,n,r){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n,r){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.options.graphQLClient.mutate({mutation:t,variables:r}).then(function(e){var t=e.data;return t[n]}).catch(function(e){throw new Error(e.message)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"query",value:function(){function e(e,n,r){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n,r){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.options.graphQLClient.query({query:t,variables:r}).then(function(e){var t=e.data;return t[n]}).catch(function(e){throw new Error(e.message)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"loginWithPassword",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n){var r;return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,k.createLoginMutation)(this.options.userFieldsFragment),e.next=3,this.mutate(r,"loginWithPassword",{user:t,password:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"impersonate",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n){var r;return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,k.createImpersonateMutation)(this.options.userFieldsFragment),e.next=3,this.mutate(r,"impersonate",{accessToken:t,username:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"createUser",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.createUserMutation,"createUser",{user:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"refreshTokens",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n){var r;return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,k.createRefreshTokenMutation)(this.options.userFieldsFragment),e.next=3,this.mutate(r,"refreshTokens",{accessToken:t,refreshToken:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"logout",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.logoutMutation,"logout",{accessToken:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"verifyEmail",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.verifyEmailMutation,"verifyEmail",{token:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"resetPassword",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.resetPasswordMutation,"resetPassword",{token:t,newPassword:n});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"sendVerificationEmail",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.sendVerificationEmailMutation,"sendVerificationEmail",{email:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"sendResetPasswordEmail",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.sendResetPasswordEmailMutation,"sendResetPasswordEmail",{email:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()}]),e}();t.GraphQLClient=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createUserMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)([" \n mutation($user: CreateUserInput!) {\n createUser(user: $user)\n }\n"],[" \n mutation($user: CreateUserInput!) {\n createUser(user: $user)\n }\n"]),i=n(2),o=r(i);t.createUserMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createImpersonateMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($accessToken: String! $username: String!) {\n impersonate(accessToken: $accessToken, username: $username) {\n authorized\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"],["\n mutation($accessToken: String! $username: String!) {\n impersonate(accessToken: $accessToken, username: $username) {\n authorized\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"]),i=n(2),o=r(i),l=n(3);t.createImpersonateMutation=function(e){return(0,o.default)(s,e,l.loginFieldsFragment)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(4),u=r(a),s=n(5),i=r(s);Object.defineProperty(t,"__esModule",{value:!0});var o=n(10);(0,i.default)(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return o[e]}})});var l=n(12);(0,i.default)(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return l[e]}})});var c=n(7);(0,i.default)(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return c[e]}})});var f=n(11);(0,i.default)(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return f[e]}})});var d=n(17);(0,i.default)(d).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return d[e]}})});var p=n(13);(0,i.default)(p).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return p[e]}})});var m=n(15);(0,i.default)(m).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return m[e]}})});var h=n(14);(0,i.default)(h).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return h[e]}})});var b=n(16);(0,i.default)(b).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return b[e]}})});var g=n(8);(0,i.default)(g).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return g[e]}})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createLoginMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($user: UserInput!, $password: String!) {\n loginWithPassword(user: $user, password: $password) {\n sessionId\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"],["\n mutation($user: UserInput!, $password: String!) {\n loginWithPassword(user: $user, password: $password) {\n sessionId\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"]),i=n(2),o=r(i),l=n(3);t.createLoginMutation=function(e){return(0,o.default)(s,e,l.loginFieldsFragment)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.logoutMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation logout($accessToken: String!) {\n logout(accessToken: $accessToken)\n }\n"],["\n mutation logout($accessToken: String!) {\n logout(accessToken: $accessToken)\n }\n"]),i=n(2),o=r(i);t.logoutMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createRefreshTokenMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($accessToken: String!, $refreshToken: String!) {\n refreshTokens(accessToken: $accessToken, refreshToken: $refreshToken) {\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n\n ","\n ","\n"],["\n mutation($accessToken: String!, $refreshToken: String!) {\n refreshTokens(accessToken: $accessToken, refreshToken: $refreshToken) {\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n\n ","\n ","\n"]),i=n(2),o=r(i),l=n(3);t.createRefreshTokenMutation=function(e){return(0,o.default)(s,e,l.loginFieldsFragment)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.resetPasswordMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($token: String!, $password: PasswordInput!) {\n resetPassword(token: $token, password: $password)\n }\n"],["\n mutation($token: String!, $password: PasswordInput!) {\n resetPassword(token: $token, password: $password)\n }\n"]),i=n(2),o=r(i);t.resetPasswordMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.sendResetPasswordEmailMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($email: String!) {\n sendResetPasswordEmail(email: $email)\n }\n"],["\n mutation($email: String!) {\n sendResetPasswordEmail(email: $email)\n }\n"]),i=n(2),o=r(i);t.sendResetPasswordEmailMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.sendVerificationEmailMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($email: String!) {\n sendVerificationEmail(email: $email)\n }\n"],["\n mutation($email: String!) {\n sendVerificationEmail(email: $email)\n }\n"]),i=n(2),o=r(i);t.sendVerificationEmailMutation=(0,o.default)(s)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultUserFieldsFragment="\n fragment UserFields on User {\n email\n username\n }\n"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.verifyEmailMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($token: String!) {\n verifyEmail(token: $token)\n }\n"],["\n mutation($token: String!) {\n verifyEmail(token: $token)\n }\n"]),i=n(2),o=r(i);t.verifyEmailMutation=(0,o.default)(s)},function(e,t){e.exports=require("babel-runtime/core-js/object/assign")},function(e,t){e.exports=require("babel-runtime/helpers/asyncToGenerator")},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/createClass")},function(e,t){e.exports=require("babel-runtime/regenerator")}])}); | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./graphql-client")); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@accounts/graphql-client", | ||
"version": "0.2.0-alpha.d383a068", | ||
"version": "0.2.0-alpha.d7d26f67", | ||
"description": "GraphQL client transport for accounts", | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"scripts": { | ||
"start": "webpack -p --config --progress --watch", | ||
"typify": "gql-gen --url http://localhost:3000/graphql --template flow --out ./flow/decl/schema.js ./src/**/*.graphql", | ||
"compile": "webpack -p --config --progress", | ||
"prepare": "npm run compile", | ||
"test": "yarn lint && yarn testonly", | ||
"test-ci": "yarn lint && yarn coverage", | ||
"start": "tsc --watch", | ||
"compile": "tsc", | ||
"test": "yarn testonly", | ||
"test-ci": "yarn coverage", | ||
"testonly": "jest", | ||
"flow": "flow; test $? -eq 0 -o $? -eq 2", | ||
"flow:check": "flow check", | ||
"flow:stop": "flow stop", | ||
"lint": "eslint src", | ||
"coverage": "yarn testonly -- --coverage", | ||
@@ -22,4 +17,11 @@ "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" | ||
"jest": { | ||
"testEnvironment": "node", | ||
"testRegex": "(/.*.(test|spec)).(js|jsx)$" | ||
"transform": { | ||
".(ts|tsx)": "<rootDir>/../../node_modules/ts-jest/preprocessor.js" | ||
}, | ||
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx)$", | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"js" | ||
], | ||
"mapCoverage": true | ||
}, | ||
@@ -37,37 +39,11 @@ "repository": { | ||
"devDependencies": { | ||
"babel-cli": "^6.16.0", | ||
"babel-core": "^6.25.0", | ||
"babel-eslint": "^7.0.0", | ||
"babel-loader": "^7.1.1", | ||
"babel-plugin-syntax-async-functions": "^6.13.0", | ||
"babel-plugin-transform-async-to-generator": "^6.16.0", | ||
"babel-plugin-transform-class-properties": "^6.24.1", | ||
"babel-plugin-transform-flow-strip-types": "^6.18.0", | ||
"babel-plugin-transform-object-rest-spread": "^6.16.0", | ||
"babel-plugin-transform-regenerator": "^6.16.1", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-es2015-node4": "^2.1.0", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"coveralls": "^2.11.14", | ||
"eslint": "^3.7.1", | ||
"eslint-config-airbnb": "^12.0.0", | ||
"eslint-config-airbnb-base": "^9.0.0", | ||
"eslint-plugin-import": "^2.0.1", | ||
"eslint-plugin-jsx-a11y": "^2.2.3", | ||
"eslint-plugin-react": "^6.3.0", | ||
"flow-bin": "^0.37.0", | ||
"graphql-code-generator": "^0.1.7", | ||
"jest": "^18.0.0", | ||
"lodash": "^4.16.4", | ||
"nock": "^9.0.2", | ||
"raw-loader": "^0.5.1", | ||
"webpack": "^1.13.2", | ||
"webpack-node-externals": "^1.5.4" | ||
"nock": "^9.0.2" | ||
}, | ||
"dependencies": { | ||
"@accounts/common": "^0.0.4", | ||
"babel-runtime": "^6.23.0", | ||
"@accounts/common": "0.1.0-alpha.58382c10", | ||
"graphql-tag": "^1.1.2" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
27174
2
4
44
331
1
+ Added@accounts/common@0.1.0-alpha.58382c10(transitive)
- Removedbabel-runtime@^6.23.0
- Removed@accounts/common@0.0.4(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedregenerator-runtime@0.11.1(transitive)