3
0
Fork 0
mirror of https://gitea.com/actions/setup-python.git synced 2024-11-23 02:29:35 +01:00
setup-python/node_modules/prettier/parser-graphql.js

2 lines
42 KiB
JavaScript
Raw Normal View History

2019-06-27 03:12:00 +02:00
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e.prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.graphql=n())}(this,function(){"use strict";function e(n){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(n)}var n=function(e,n){var t=new SyntaxError(e+" ("+n.start.line+":"+n.start.column+")");return t.loc=n,t};var t=function(e){return/^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(e)};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(e,n){return e(n={exports:{}},n.exports),n.exports}var o=i(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getLocation=function(e,n){var t,r=/\r\n|[\n\r]/g,i=1,o=n+1;for(;(t=r.exec(e.body))&&t.index<n;)i+=1,o=n+1-(t.index+t[0].length);return{line:i,column:o}}});r(o);var a=i(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_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});n.Kind=t});r(a);var c=i(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t="function"==typeof Symbol?Symbol.for("nodejs.util.inspect.custom"):void 0;n.default=t});r(c);var u=i(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.prototype.toString;e.prototype.toJSON=n,e.prototype.inspect=n,r.default&&(e.prototype[r.default]=n)};var t,r=(t=c)&&t.__esModule?t:{default:t}});r(u);var d=i(function(e,n){function t(e,n){var t=e.locationOffset.column-1,i=r(t)+e.body,o=n.line-1,a=e.locationOffset.line-1,c=n.line+a,u=1===n.line?t:0,d=n.column+u,s=i.split(/\r\n|[\n\r]/g);return"".concat(e.name," (").concat(c,":").concat(d,")\n")+function(e){var n=e.filter(function(e){e[0];var n=e[1];return void 0!==n}),t=0,i=!0,o=!1,a=void 0;try{for(var c,u=n[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var d=c.value,s=d[0];t=Math.max(t,s.length)}}catch(e){o=!0,a=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}return n.map(function(e){var n,i=e[0],o=e[1];return r(t-(n=i).length)+n+o}).join("\n")}([["".concat(c-1,": "),s[o-1]],["".concat(c,": "),s[o]],["",r(d-1)+"^"],["".concat(c+1,": "),s[o+1]]])}function r(e){return Array(e+1).join(" ")}Object.defineProperty(n,"__esModule",{value:!0}),n.printError=function(e){var n=[];if(e.nodes){var r=!0,i=!1,a=void 0;try{for(var c,u=e.nodes[Symbol.iterator]();!(r=(c=u.next()).done);r=!0){var d=c.value;d.loc&&n.push(t(d.loc.source,(0,o