webhook-action/node_modules/prettier/parser-graphql.js

2 lines
54 KiB
JavaScript
Raw Normal View History

2020-08-27 08:23:33 +00:00
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):((e="undefined"!=typeof globalThis?globalThis:e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.graphql=n())}(this,(function(){"use strict";var e=function(e,n){const t=new SyntaxError(e+" ("+n.start.line+":"+n.start.column+")");return t.loc=n,t};var n={hasPragma:function(e){return/^\s*#[^\S\n]*@(format|prettier)\s*(\n|$)/.test(e)},insertPragma:function(e){return"# @format\n\n"+e}};function t(e,n,t){return e(t={path:n,exports:{},require:function(e,n){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==n&&t.path)}},t.exports),t.exports}var i=t((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SYMBOL_TO_STRING_TAG=n.SYMBOL_ASYNC_ITERATOR=n.SYMBOL_ITERATOR=void 0;var t="function"==typeof Symbol?Symbol.iterator:"@@iterator";n.SYMBOL_ITERATOR=t;var i="function"==typeof Symbol?Symbol.asyncIterator:"@@asyncIterator";n.SYMBOL_ASYNC_ITERATOR=i;var r="function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag";n.SYMBOL_TO_STRING_TAG=r})),r=t((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n){if(!Boolean(e))throw new Error(n)}})),o=t((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Source=void 0;var t,o=(t=r)&&t.__esModule?t:{default:t};function a(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var s=function(){function e(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};this.body=e,this.name=n,this.locationOffset=t,this.locationOffset.line>0||(0,o.default)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,o.default)(0,"column in locationOffset is 1-indexed and must be positive.")}var n,t,r;return n=e,(t=[{key:i.SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}])&&a(n.prototype,t),r&&a(n,r),e}();n.Source=s})),a=t((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getLocation=function(e,n){var t,i=/\r\n|[\n\r]/g,r=1,o=n+1;for(;(t=i.exec(e.body))&&t.index<n;)r+=1,o=n+1-(t.index+t[0].length);return{line:r,column:o}}})),s=t((function(e,n){function t(e,n){var t=e.locationOffset.column-1,o=r(t)+e.body,a=n.line-1,s=e.locationOffset.line-1,c=n.line+s,u=1===n.line?t:0,l=n.column+u,d="".concat(e.name,":").concat(c,":").concat(l,"\n"),p=o.split(/\r\n|[\n\r]/g),f=p[a];if(f.length>120){for(var h=Math.floor(l/80),T=l%80,v=[],E=0;E<f.length;E+=80)v.push(f.slice(E,E+80));return d+i([["".concat(c),v[0]]].concat(v.slice(1,h+1).map((function(e){return["",e]})),[[" ",r(T-1)+"^"],["",v[h+1]]]))}return d+i([["".concat(c-1),p[a-1]],["".concat(c),f],["",r(l-1)+"^"],["".concat(c+1),p[a+1]]])}function i(e){var n=e.filter((function(e){e[0];return void 0!==e[1]})),t=Math.max.apply(Math,n.map((function(e){return e[0].length})));return n.map((function(e){var n,i=e[0],o=e[1];return r(t-(n=i).length)+n+(o?" | "+o:" |")})).join("\n")}function r(e){return Array(e+1).join(" ")}Object.defineProperty(n,"__esModule",{value:!0}),n.printLocation=function(e){return t(e.source,(0,a.getLocation)(e.source,e.start))},n.printSourceLocation=t})),c=t((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Kind=void 0;var t=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINIT